Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing Access Tables
Message
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
01112620
Message ID:
01112689
Views:
18
This message has been marked as the solution to the initial question of the thread.
>Hi....looking for the easiest way to Access an Access .mdb, to use like native VFP tables (mostly for querying and reporting).
>
>I was delighted to see in VFP 9.0, that when I went to create a new .DBC container that one of the options was to use an Access .MDB as the basis for the container...but...there is no data transferred.
>
>Is there a one-liner connection string?
>
>TIA

Yes,
constring = "DBQ=f:\...\yourname.mdb;Driver={Driver do Microsoft Access (*.mdb)};DriverId=25;FIL=MS Access;MaxBufferSize=2048;MaxScanRows=8"

sqlHandler = SQLSTRINGCONNECT(constring)
IF sqlhandler < 1
   MESSAGEBOX("No connection")
   RETURN
ENDIF

TEXT TO sqlSelect NOSHOW ...
     SELECT ...  FROM ZZLL ... WHERE...
ENDTEXT

IF SQLEXEC(sqlHandler,sqlselect,"MyCursor") <0
   MESSAGEBOX("Error...")
ENDIF
_______________________________________________________________
Testing displays the presence, not the absence of bugs.
If a software application has to be designed, it has to be designed correctly!
_______________________________________________________________
Vladimir Zografski
Systems Analyst
Previous
Reply
Map
View

Click here to load this message in the networking platform