Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why I prefer stored procs
Message
De
15/06/2007 12:44:47
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
14/06/2007 15:15:55
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01232867
Message ID:
01233537
Vues:
10
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform