Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Why I prefer stored procs
Message
De
14/06/2007 15:15:55
 
 
À
14/06/2007 13:28:21
Walter Meester
HoogkarspelPays-Bas
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
01232867
Message ID:
01233226
Vues:
13
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform