Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Searching MS Access data from within VFP6
Message
From
31/12/2004 04:27:30
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
30/12/2004 21:26:38
Barbara Hill
B.L. Hill Applications Limited
Halifax, Nova Scotia, Canada
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Environment versions
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP1
Network:
Windows NT
Miscellaneous
Thread ID:
00973466
Message ID:
00973500
Views:
18
>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
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform