Fetching from FoxPro tables and updating SQL server tables

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi

I am using vb.net

Is it possible to fetch data from foxpro tables (vfp8) and update tables in sql server 2000? The table structures of the foxpro tables are different from those in sql server. Depending on the data fetched, I would like to update relavent table columns in sql server. How can this be done

Regards
Sarah
 
Hi Sarah,

Download the odbc dll for .net and then use it in an imports statement like
this:
Imports Microsoft.Data.Odbc

Then set up the connection:

Dim oconn_d As New OdbcConnection("Driver={Microsoft dBase Driver
(*.dbf)};UID=admin;usercommitsync=yes;threads=3;statistics=0;safetransaction
s=0;pagetimeout=5;maxscanrows=8;maxbuffersize=2048;FIL=dBase
IV;DriverID=533;deleted=0;defaultdir=f:\imcapps\dbffiles;dbq=f:\imcapps\dbff
iles;collatingsequence=ascii;")

The dbase driver should work, but you can also check out other driver
connections at http://www.able-consulting.com/ado_conn.htm

Then simply open both tables and copy data from one table to the other.

HTH,

Bernie Yaeger



Sarah said:
Hi,

I am using vb.net.

Is it possible to fetch data from foxpro tables (vfp8) and update tables
in sql server 2000? The table structures of the foxpro tables are different
from those in sql server. Depending on the data fetched, I would like to
update relavent table columns in sql server. How can this be done?
 
In news: (e-mail address removed),
Bernie Yaeger said:
The dbase driver should work, but you can also check out other driver
connections at http://www.able-consulting.com/ado_conn.htm

Hi Bernie,

The Dbase driver will most likely not work. New features have been added to
VFP tables, making them incompatible with old drivers.

For Sarah - Even though your tables were created with VFP8, if they do not
have any of the new data features added in VFP7 and VFP8 then your tables
can be read with the VFP ODBC driver, which will read all previous versions
too. If any of the VFP7 or VFP8 features have been used then you can access
the tables vial the Visual FoxPro OLE DB data provider, which will read all
previous table versions also.

Both the ODBC driver and OLE DB data provider can be downloaded from
http://msdn.microsoft.com/vfoxpro/downloads/updates/default.aspx.
 
Back
Top