Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
OLEDB Command completion
Message
From
07/03/2011 08:57:25
 
 
To
07/03/2011 08:38:52
General information
Forum:
ASP.NET
Category:
ADO.NET
Environment versions
Environment:
C# 3.0
Miscellaneous
Thread ID:
01502804
Message ID:
01502830
Views:
38
Michel

Thank you for your reply.

This is a free VFP table with no primary key or autoinc column
I just want to know that the insertion has been completed before moving on to the next instruction




>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.
Anyone who does not go overboard- deserves to.
Malcolm Forbes, Sr.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform