David Seruyange's Radio Weblog
Tidbits for developers and the interested...

David-ism
Watu
Vicariously
Photo Blogs
Form, Function
Write, Think
Web People
Coders
Feel Good


Subscribe to "David Seruyange's Radio Weblog" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

Home (all entries)  | Technie  | Prattle (personal stuff)  | Books  | Snippets  | WhiteBox


Wednesday, October 23, 2002
 

Not much of one for classic rock or kittens but this is funny.
8:10:54 PM    comment []

Well, MSN is referring to the 'Big Books of October'.  All of which suck, IMHO.  If you want to find a good book to engross yourself in, check out Canongate.  I found them by fluke and have been a frequent visitor since.  Unfortunately they are in the U.K., so I haven't purchased anything from them as of yet.  I may, however, as they carry books that simply aren't available here in the U.S.  I'm also dying to read something really non-American of late - the type of exotic experience I had reading Sputnik Sweetheart.


8:02:52 PM    comment []

I just learned that Gray's Anatomy is onlineBack up the URL a bit and you'll find more goodies.

Now someone just needs to put up a free Dictionary of Allusions.


7:53:40 PM    comment []

Elizabeth blogs about a new magazine called 'Seed'.  Her thinly veiled opinion ("unequivocally and irremediably sucked") was a bit harsh but after looking at the models on the cover of the magazine and reading some of the postambulatory abuse, I'll browse it with caution.
7:49:18 PM    comment []

scintilla: Dictionary.com Word of the Day. scintilla [Dictionary.com Word of the Day]

- Always nice to expand the vocab...

Scintilla is really not an onomatopoeia [yes, I had to look up the spelling].  Three clunky syllables for something that describes small.  Harrumph! 

Use iota instead.


7:29:00 PM    comment []

Executing Stored Procs with ADO.NET

Days like these.  Today I spent most of the day ironing out one of about 6 stored procedures related to underwriting for our loan application.  We still have yet to put all the pieces together but sigh, there's no end in sight right now.

I feel quite proud of myself though; the way our code is formated at this point it's really easy to track down bugs like missing parameters or invalid data types.

I always follow the same approach to putting together stored procedures:

1.  Declare an ArrayList for the parameters.
2.  Add the params as anonymous instances of SqlParameter using the 2 part constructor (paramname, value).
3.  Create command, iterate the ArrayList and add to the parameters collection.

Some sample code:

 

// build parameter definitions
ArrayList parms = new ArrayList();
// parameters that arrive from the arguments
parms.Add(new SqlParameter("@CompanyID",m_companyid));
parms.Add(new SqlParameter("@CustNum",m_cust));
parms.Add(new SqlParameter("@Info",story.Information));
// ... and so on

// trap output parameter SqlParameter ident = new SqlParameter("@TTStoryID",SqlDbType.Int); ident.Direction = ParameterDirection.Output; parms.Add(ident); // build command... SqlCommand insStory = new SqlCommand("uspTeletrackStoryInsert"); insStory.CommandType = CommandType.StoredProcedure; // append parameters foreach(object obj in parms){ insStory.Parameters.Add((SqlParameter)obj); } insStory.Connection = myconnection; insStory.ExecuteNonQuery();

QED, really.


7:17:35 PM    comment []


Click here to visit the Radio UserLand website. © Copyright 2006 David Seruyange.
Last update: 5/23/2006; 8:20:14 PM.
October 2002
Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Sep   Nov