Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. sponsors. rss.
 From: Jim Lloyd
  Where is Jim Lloyd?
 Hove
 United Kingdom
 Jim Lloyd
 To: Anders Altberg
  Where is Anders Altberg?
 Uppsala
 Sweden
 Anders Altberg
 Tags
Subject: RE: Querying VFP database using Access 2007
Thread ID: 204753 Message ID: 204759 # Views: 29 # Ratings: 0
Version: Not Applicable Category: ODBC, ADO and OLEDB
Date: Sunday, November 23, 2008 11:56:26 AM         
   


> > Hello,
> >
> > I'm attempting to query a VFP database from Access 2007. When I try to import from a table using 'external data > more > ODBC database' I can choose the table from the database but I'm presented with an error message saying
> >
> > 'Invalid field definition 'DELETED()' in definition of index or relationship'.
> >
> > Any thoughts as to what's causing this would be much appreciated. I've successfully queried the database using Excel, but I'd like to be able to make more presentable reports based on the query.
> >
> > I'm connecting using the Visual FoxPro Driver under 'machine data sources'.
> >
> > Many thanks
> >
> > Jim
>
>
> You add SET DELETED in the connection by adding ;DELETED=Yes; to the string.
> You should probably not use VFPODC at. It's not been updated sin VFP6. Today we use VFPOLEDB.DLL instead with an ADODB.Connection oobject.
> The latest version of VFPOLEDB is version 9 and can be downloaded from Microsoft.
>
> -Anders

Hmmm.. Thanks for the replies. I think I may be a little out of my depth with ADODB connection objects. I don't know how I'd go about setting one of those up! I have installed the VFPOLEDB from the Microsoft site.

As far as I'm aware, the connection would have DELETED=Yes set already. The connection I've set up in the 'Control Panel > ODBC' has the following settings:

Collating = Machine
Exclusive = FALSE
Null = TRUE
Deleted = TRUE
Fetch data in background = TRUE

The connection works fine for Excel, but Access comes up with this error. I'm starting with a blank database, I don't intend to edit the data or anything, just query it so I can create presentable reports (usual stuff- sales figures etc). I assumed Access would be able to connect in a similat manner and then I could create reports based on the query.

Again, thanks for the replies.

Jim



COMPLETE THREAD
Querying VFP database using Access 2007 Posted by Jim Lloyd @ 11/23/2008 9:21:48 AM
RE: Querying VFP database using Access 2007 Posted by M. Akram Bhatti @ 11/23/2008 10:22:29 AM
RE: Querying VFP database using Access 2007 Posted by Anders Altberg @ 11/23/2008 11:07:23 AM
RE: Querying VFP database using Access 2007 Posted by Jim Lloyd @ 11/23/2008 11:56:26 AM
RE: Querying VFP database using Access 2007 Posted by Anders Altberg @ 11/23/2008 1:03:52 PM
RE: Querying VFP database using Access 2007 Posted by Cetin Basoz @ 11/23/2008 2:09:36 PM
RE: Querying VFP database using Access 2007 Posted by Jim Lloyd @ 11/23/2008 6:50:00 PM
RE: Querying VFP database using Access 2007 Posted by Cetin Basoz @ 11/24/2008 12:50:53 AM