Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Simon Arnold
  Where is Simon Arnold?
 Halifax
 United Kingdom
 Simon Arnold
 To: Terry Bottorff
  Where is Terry Bottorff?
 Cheyenne
 Wyoming - United States
 Terry Bottorff
 Tags
Subject: RE: ODBC
Thread ID: 22462 Message ID: 22481 # Views: 37 # Ratings: 0
Version: Visual FoxPro 8 Category: ODBC, ADO and OLEDB
Date: Saturday, April 19, 2003 6:41:48 PM         
   


> > > Is there a new ODBC Driver for VFP8? If so where can you find it? TIA.
> > > Buffiie
> >
> > I belive the new driver is the OLEDB driver that first shipped with VFP 7. (VFPOLEDB).
> >
> > The Version installed with VFP 8 is : 8.0.00.2521
> >
> > Simon Arnold.
> I have vfp8 installed and running on winxp. I try to set up an odbc connection and it tells me I must get the latest driver from microsoft. Any ideas? TIA.
>
> Buffiie

The last ODBC Driver that was available for VFP is the one that ships with VFP 6, this is the download link.
http://www.msdn.microsoft.com/vfoxpro/downloads/addons/odbc.asp

To use the new VFPOLEDB driver you can't set up an ODBC driver, you need to connect via a DSN-less connection, also this new driver allows access to VFP tables from other languages like VB, C#, VB.NET, etc..

CLEAR
LOCAL oConn as "adodb.connection"
LOCAL oRS as "adodb.recordset"
oConn = CREATEOBJECT('adodb.connection')
oRS = CREATEOBJECT('adodb.recordset')
cConnStrng = "Provider=vfpoledb;Data Source="+HOME(2)+"northwind\northwind.dbc"
oConn.Open(cConnStrng)
oConn.BeginTrans()
oConn.Execute("UPDATE Customers SET contactname = 'Patricio X. Simpson';
   WHERE customerid='CACTU'")
oRS = oConn.Execute("SELECT * FROM customers WHERE customerid = 'CACTU'")
?oRS.Fields("contactname").Value
oConn.RollbackTrans()
oRS.Requery()
?oRS.Fields('contactname').Value
oRS.Close()
oConn.Close()


Hope this helps.

Simon Arnold.


COMPLETE THREAD

ODBC Posted by Terry Bottorff @ 4/18/2003 5:40:37 PM
RE: ODBC Posted by Simon Arnold @ 4/18/2003 8:14:55 PM
RE: ODBC Posted by Terry Bottorff @ 4/18/2003 8:20:42 PM
RE: ODBC Posted by Simon Arnold @ 4/19/2003 6:41:48 PM
RE: ODBC Posted by Terry Bottorff @ 4/19/2003 8:07:45 PM