Wiki Home

VFP ODBC Driver

(Updated: 2010.07.31 10:28:13 AM)
Namespace: SoftwareEng
Check new driver info at bottom....
Driver can be downloaded here....
http://msdn2.microsoft.com/en-us/vfoxpro/bb190233.aspx
Stuff you can and cannot do with the VFP ODBC driver.

Can

Can't


What alternate methods are folks using for merging data into Word documents?
Ken Kix: I have decided to "bail" and use an ASCII CSV file instead. My formletter object takes the result of a SQL and (used to) create a table with which to merge. I changed it to create a Cursor, and do a "Copy to xx type CSV". Now I just hope that MS doesn't mess up how Word works with _that_ type of file!
I've been using COPY TO ... TYPE XL5 since Word users typically have Excel and this permits browsing and pre-merge eyeballing, which can be important to some. -- Steven Black
I have also used the COPY TO ... TYPE XL5. The advantage of creating one of these from a temporary cursor vs. a DBF is you can retain long field names (which become column headers in row 1) without having to create a temp DBC. The downside to both of these approaches, I believe, is that memo fields can't be dealt with. I could be wrong, haven't tried in a while. -- Randy Jean
Something else that is odd about Word merges with Excel: This is one of those do as we say not as we do things from Microsoft - If you look at the status messages in Word97 during a merge with Excel you see it is establishing a DDE connection! What's up with that? Don't know if this is still the case in Office 2000 -- Randy Jean
See KB Article Q235357 Offsite link to http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q235357 PRB: FoxPro ODBC Driver Replaced by Visual FoxPro ODBC Driver.(TomPiper passed this along in CIS VFP Forum) -- Ken Kix
Also Q231714 Offsite link to http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q231714 BUG:Cannot Export or Open Linked FoxPro Tables Using Latest ODBC Visual FoxPro Driver (6.0.8428.0)
The help file Drvvfp.hlp can be found in the system directory. Among other good information, this file documents commands not supported by the ODBC 6.0 driver.
One thing I have not been able to do with the latest ODBC driver, is to save the contents of a TEXTAREA to a memo field if the RETURN key is hit anywhere inside the TEXTAREA. The ODBC driver chokes on CRLF's! This is not an issue when using a VFP COM Server like in WC, only through the ODBC driver. has anyone else seen this, What kind of solution is there? -- Harold Chattaway

Have you tried stripping the CRLF's by replacing them with some literal string ([CRLF]) and visa versa at the appropriate times? -Brett

A good solution is to replace the CRLF (chr10) with chr13-Laith

I was able to use the chr function in the sql. Example: insert into mytable (mymemo) values ('this is'+chr(13)+'a test');

Note:

Has anyone run into performance issues with VFP ODBC 2.5 driver running under MDAC 2.6? -- David TAnderson

YES! Especially going over a network. Just updated a client to MDAC 2.7 and all seems zippy now. ODBC Driver version is the same. Huh? -- Randy Jean

There is also the OLE DB provider for VFP, available with VS.NET. -- Cindy Winegarden

Is the VFP _ Ole DB _ Provider included in the VS.NET Beta? Has anyone used it? If so, I'm wondering if we will be able to access all the views in our .DBC's - the ODBC driver had problems publishing more than 20 or 30 views in the .DBC - this was always a big problem for us. -- William Fields

See: VFP Ole DBProvider
The new VFP ODBC Driver released as part of the Advantage Database Server Version 9.0 (Beta) is fully compatible with VFP 9.0 Data. You can download the driver from the Advantage website here: http://devzone.advantagedatabase.com/dz/content.aspx?Key=20
The Advantage Database Server has other capabilities, but if you need an updated ODBC driver for VFP, this one appears to work really well and (while the product is in Beta anyway) is free. Posted Jan.2008.

Unless I misunderstand, the Advantage ODBC driver insists on finding a running instance of the advantage server, so you not only have to install their odbc driver, but also their server. Or perhaps I've mis-understood the errors I was getting. -- RickBoatright

You need to configure the datasource as "local server" instead of the default which is "remote". Then you do not need the Advantage server. -- Andy Kramek

You might want to watch this video by J. D. Mullin, R & D Manager for Advantage. -- Doug Hennig

If you set the datasource up to use "local server" instead of "remote server" (which is the default) you do not need to install the server. You don't get the benefits of client/server access, but it is a good starting point. -- J.D.

Another thing to watch out: The ADS ODBC-driver cannot execute any DBC-features like Trigger or Stored Procedures. It also omits Defaultvalues when adding new records.... In short: since it cannot run FoxPro code, everything based on FoxPro-Code doesn't work. thus: Handle with care in a real VFP-Database-Environment! --wOOdy




Contributors: Pamela Thalacker Mike Yearwood Jos�Constant AndersAltberg PeterSnowball Ken Kix Steven Black Harold Chattaway David TAnderson Cindy Winegarden Andy Kramek
Category Data Category 3 Star Topics