Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using Parameters with the VFPOLEDB provider?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Visual FoxPro et .NET
Divers
Thread ID:
00833708
Message ID:
00833728
Vues:
19
It's gotta be documented somewhere, but I found it by trial and error. And a little bit of guessing that it might be sort of like the VFP parameter syntax for SQLExec()

>Thanks Bill, that worked. And it even works with SQL server.
>
>Is this sort of thing documented anywhere? I cant find reference to using parameters with the VFP OLEDB provider anywhere and the only reference to parameters on SQL server specifies the "@" format?
>
>
>Thanks again,
>
>Chris.
>
>
>>You can definately do that. This is from the top of my head, but I think you just use the ? alone in the command text, but use the ?groupName in the parameter. Just make sure to keep the parameters in order.
>>
>>System.Data.OleDb.OleDbCommand SaveGroupCommand = new OleDbCommand(
>>				"UPDATE GROUPDETAILS SET GROUPNAME = ? WHERE GROUPDETAILS.GROUPID = ? ", dbConnection);
>>
>>SaveGroupCommand.Parameters.Add("?groupName", "Did it save");
>>SaveGroupCommand.Parameters.Add("?groupId", this.GroupId);
>>SaveGroupCommand.ExecuteNonQuery();
>>
>>
>>
>>
Bill Mittenzwey
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform