Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using OleDBCommand to Insert VFP records
Message
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Titre:
Using OleDBCommand to Insert VFP records
Divers
Thread ID:
01248996
Message ID:
01248996
Vues:
66
Hi.
I am having lots of troulbe using Parameters with OleDbCommand and ExecuteNonQuery command. Its coming up with syntax errors at runtime.

Initially I tried the following:
--------------------------------
My String is like:
string sql = "Insert into MyTable (Fielda,Fieldb) Values (@Fielda,@Fieldb)"
and added a parameter for each field.
This always gave a Syntax Error at runtime

I then tried:(After seeing one example)
-------------
string sql = "Insert into MyTable (Fielda,Fieldb) Values (?,?)"
and just added the fields in turn (without the @)
This seemed to work ok.

It would seem that you cannot use Named Paramaters, and they must be strictly in sequence.Can anybody confirm this and also the syntax of the bit in the sql string after the Values.

Are there any examples anywhere of using VFP and OleDBParamater .I've done a search on the net but examples semm to be in short supply.

Regards,
Gerard
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform