Error 42000 Microsoft Odbc Visual Foxpro Driver Syntax Error

Driver

Visual

Error 42000 Microsoft Odbc Visual Foxpro Driver Syntax Error Example

Driver

Odbc Visual Foxpro Driver Download

Hi, you need to post the sql statement in your stored procedure. Basically, the syntax of inserting data is Insert into Regi (name) values (?) Hope this helps. Con.OPEN('DRIVER=Microsoft Visual FoxPro Driver;SourceType=DBF;SourceDB=c: data myapp;Exclusive=NO;BackGroundFetch=NO;NULL=NO;Collate=MACHINE') This seemed to work for ISPs running Windows 2000 servers but ISPs running Windows 2003 had to be asked each time to reinstall their VFP ODBC drivers before it would work.

Hi Friends,
Getting this error, while trying to insert user details, Please help
Error
System.Data.Odbc.OdbcException: ERROR [42000] [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement. at System.Data.Odbc.OdbcConnection.HandleError(HandleRef hrHandle, SQL_HANDLE hType, RETCODE retcode) at System.Data.Odbc.OdbcCommand.ExecuteReaderObject(CommandBehavior behavior, String method) at System.Data.Odbc.OdbcCommand.ExecuteReader(CommandBehavior behavior) at System.Data.Odbc.OdbcCommand.ExecuteReader() at ID.IW.InsertWork.InsertName(String name) in E:Site's WorkIDEAS DatabaseDataWorkInsertWork.vb:line 51
Description: An unhandled exception occurred during the execution of the current web

'Getting the ODBC name from Config file
'Dim ConStr As String =
Dim Con As New OdbcConnection(ConfigurationSettings.AppSettings('constr'))
Public Function InsertName(ByVal name As String) As String
Dim SS As String = 'Insert into Regi (name) values ?'
Dim cmd As New OdbcCommand('Pal', Con)
cmd.CommandType = CommandType.StoredProcedure
cmd.Parameters.Add('?', OdbcType.Char, 50).Value = name
Try
If Con.State = ConnectionState.Closed Then
Con.Open()
End If
cmd.ExecuteReader()
Catch ex As Exception
Throw New System.Exception(ex.ToString)
Finally
Con.Close()
End Try
Return 'Job Done'
End Function

thanks in advance
Bye
Viking