Error 42000 Microsoft Odbc Visual Foxpro Driver Syntax Error

Posted : admin On 5/27/2019

I am trying to write a program to read a DBF file and put it into a datatable. I don't have much experience working with FoxPro database.Below is the funcation that opens the dbf. I pass the filename into the function. Best gta vice city mods.

Silk Test Knowledge Base Why am I receiving the error More. New This group requires membership for participation - click to join +Knowledge Base. Jun 14, 2005  Welcome to PC Review! Hello and welcome to PC Review. We're a friendly computing community, bustling with knowledgeable members to.

May 31, 2011  Dear all, I need to read the dBase file (.dbf) and then import data to SQL server. The following is the code in my.aspx.vb page, Imports System.Data.Odbc Partial Class copy_prs Inherits System.Web.

The Variable for the filename is

At run time I get this error

Peter SunPeter Sun

2 Answers

First, if you are working with Foxpro tables, I would not use the dBase driver.

Microsoft Odbc Visual Foxpro Driver Cannot Update The Cursor

Second, look into connections strings. You DO NOT want the connection string to mention an actual table.dbf, but just the PATH to where the database files are located. Then, your queries are as simple as..

Error 42000 microsoft odbc visual foxpro driver syntax error

select * from SomeTable

Additionally, there are plenty of other Q&A associated with VFP and OleDB. If you do a seach specifically of my user ID plus those tags, you will get a list of the questions I've specifically offered out here. There are many from running scripts, simple querying, using parameterized queries, etc.

Here is an example search you could put in..user:74195[vfp][oledb]

DRappDRapp

Microsoft Visual Foxpro Driver

Visual

Try adding the file name into the ODBC connection string.

and for the table name you might need to be '[schema.tableName]' which is where your @FileName is right now. Something like:

Thomas TaylorThomas Taylor

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