> > 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