Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Searching MS Access data from within VFP6
Message
De
31/12/2004 04:27:30
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
30/12/2004 21:26:38
Barbara Hill
B.L. Hill Applications Limited
Halifax, Nouvelle-Écosse, Canada
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Versions des environnements
Visual FoxPro:
VFP 6 SP5
OS:
Windows XP SP1
Network:
Windows NT
Divers
Thread ID:
00973466
Message ID:
00973500
Vues:
17
>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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform