Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
OLEDB Command completion
Message
De
07/03/2011 08:38:52
 
 
À
06/03/2011 23:45:16
Information générale
Forum:
ASP.NET
Catégorie:
ADO.NET
Versions des environnements
Environment:
C# 3.0
Divers
Thread ID:
01502804
Message ID:
01502826
Vues:
54
>I want to be sure that a row has been inserted in an OLEDB VFP table before proceeding to the next instruction.
>Does ExecuteNonQuery complete the OLEDB command before continuing to the next instruction?
>If not, what's the best way to be sure that the row has been inserted before proceeding?

Once you have done this:
oDataAdapter.SelectCommand.ExecuteNonQuery()
You can do this to get the primary key:
oCommand.CommandText = "GETAUTOINCVALUE(0)"
oCommand.CommandType = CommandType.StoredProcedure
nPrimaryKey = CInt(oCommand.ExecuteScalar())
Where oDataAdapter and oCommand represent your object to their respective classes.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform