The SQL provider is the only one that supports named parameters.
>Off the top of my head, I don't know which other providers use positional parameters, but I know that VFP is not alone in that regard. I use SQL, so I don't have that issue to worry about.
>
>~~Bonnie
>
>
>
>
>>Hi Bonnie. Thnaks for replying.
>>
>>Do you know if the VFPOleDB is the only prvider that works like that, or are there other ones out there also ?
>>
>>Regards,
>>Gerard
>>
>>
>>
>>>Gerard,
>>>
>>>Yes,the VFPOleDB provider requires positional parameters and does not work with named parameters. The syntax you used with the ? is the correct syntax.
>>>
>>>~~Bonnie
>>>
>>>
>>>
>>>>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
Michael McLain