Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Connecting to an Access Database
Message
From
16/04/2003 03:50:16
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
15/04/2003 16:00:21
Sony Joseph
Dovenmuehle Mortgage Inc
Schaumburg, Illinois, United States
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00778022
Message ID:
00778215
Views:
21
>Hi,
>
>Can any one help me with code snippet to connect to a local Access Database through VFP?
>
>TIA.

Sony,
Check FAQ #8039
Basically you create a connection and then use SPT. ie:(extracted from FAQ)
lcDataBaseName = 'MSDN'
lcMDBDir = 'C:\My Documents\MSDN CD SUBCRIPTION INDEXES\UN-SUPPED'
lcMDBName = 'MSDN APRIL CD SUBCRIPTION INDEX.MDB'
lnConnHandle = SQLSTRINGCONNECT('DSN=MS Access Database;DBQ='+;
  lcMDBDir+'\'+lcMDBName+';DefaultDir='+;
  lcMDBDir+';DriverId=25;FIL=MS Access;MaxBufferSize=2048;'+;
  'PageTimeout=5;UID=admin;')

SQLExec(lnConnHandle, 'SomeSQLCommandHere')
SQLDisconnect(lnConnHandle)
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