>Hi All,
>
>I have a client whose business is property valuations. He runs several different programs in various lanquages to perform all the tasks necessary for his business. One of the programs is a VFP 6 application that maintains a list of properties. He would like the VFP application to indicate if there is data relating to a property in the other applications. In most cases I can do this easily as the files are named with the address or job number. There is one application, however, where all of the data for all properties is kept in an MS Access MDB file.
>
>How can I search the MDB file for the job number OR how can I get the data from the MDB file into something VFP can search through?
>
>Any help is appreciated.
>
>Barb Hill
Check FAQ #8039
You can use ODBC/OLEDB to access < bg > Access. ie: Assuming you've Office10 installed:
lcMDBFile = "C:\Program Files\Microsoft Office\Office10\Samples\Northwind.mdb"
lnHandle = SQLStringConnect("Driver={Microsoft Access Driver (*.mdb)};" +;
"Uid=Admin;Pwd=;Dbq="+m.lcMDBFile)
lcCountry = "USA"
SQLExec(m.lnHandle,"select * from customers where country = ?m.lcCountry","myCursor")
SQLDisconnect(m.lnHandle)
Select myCursor
Browse
If there is workgroup security then connection string is like:
"Driver={Microsoft Access Driver (*.mdb)};Dbq=C:\mydatabase.mdb;SystemDB=C:\mydatabase.mdw;"
Cetin