Hi, I am trying to access a foxpro table using ADODB and am getting this error: ODBC Synttax error or Access Violation. I do have an ODBC driver for this table.

Download rain and the rhinoceros pdf free. Hy
I want to insert into ODBC and I have the error: ERROR [42000] [Microsoft][ODBC Visual FoxPro Driver]Syntax error.
My code is:

The problem is with the data, but I cannot figure out what is the problem.
Can someone help me?
Thanks

Visual
user599977user599977

1 Answer

try with a ? instead of @data in the query, like this:

These instructions may not be applicable to consoles. Gembird steering wheel.

Msdn says:

Microsoft Visual Foxpro Driver

When CommandType is set to Text, the .NET Framework Data Provider for ODBC does not support passing named parameters to an SQL statement or to a stored procedure called by an OdbcCommand. In either of these cases, use the question mark (?) placeholder.

UPDATEyou could try concatenating your date directly in the insert in this format { d '2011-03-10' } (see ODBC Datetime Format for reference) and drop the parameter.

Microsoft Odbc Visual Foxpro Driver Cannot Update The Cursor

Paolo FalabellaPaolo Falabella

Error 42000 Microsoft Odbc Visual Foxpro Driver Syntax Error

Microsoft

Not the answer you're looking for? Browse other questions tagged c#datetimeinsertodbc or ask your own question.

Coments are closed
Scroll to top