Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why I prefer stored procs
Message
From
15/06/2007 12:44:47
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
01232867
Message ID:
01233537
Views:
11
>2. As opposed to remote views, the developer needs to have a list of all update parameters and pass them at the right position, not making updates transparant nor easy.
>
>Walter, I know I responded to this earlier - but I want to raise this again....by "position", do you mean the specific order? If that's what you meant...it doesn't matter if I do...
>
>
>oList.Add(new SqlParameter("@PK",PK));
>oList.Add(new SqlParameter("@Interviewed", System.DBNull.Value));
>oList.Add(new SqlParameter("@LastEvalDate", LastEvalDate));
>
>or
>
>
oList.Add(new SqlParameter("@LastEvalDate", LastEvalDate));  </i>
>oList.Add(new SqlParameter("@Interviewed", System.DBNull.Value));
>oList.Add(new SqlParameter("@PK",PK));
>
>(basically reversing the order).....
>
>And then....
>
>
>SqlCommand oCmd = new SqlCommand("Myprocname", oSqlConnectionObject);
>oCmd.CommandType = CommandType.StoredProcedure
>
>foreach(SqlParameter oParm in oParmList)
>   oCmd.Parameters.Add(oParm);
>
>
>Both work fine...
>
>Kevin

Kevin,
This wouldn't work if you use a generic driver like OleDb, no?
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform