>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