Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing Access database
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
01202567
Message ID:
01202589
Views:
10
Thanks Vladimir.
Sounds like what I am looking for.

Regards,
Gerard
>>My VFP app needs to access an Acces database
>>This is an ongoing requirement in the app.
>>Anybody got ideas on how to do this ?
>>
>>Regards,
>>Gerard
>
>Hi Gerard,
>
>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
>   AERROR(arrError)
>   MESSAGEBOX(arrError(1,2))
>   RETURN
>ENDIF
>
>TEXT TO sqlSelect NOSHOW ...
>     SELECT ...  FROM ZZLL ... WHERE...
>ENDTEXT
>
>IF SQLEXEC(sqlHandler,sqlselect,"MyCursor") <0
>   AERROR(arrError)
>   MESSAGEBOX(arrError(1,2))
>   RETURN
>ENDIF
>
>
>The data from Access database are in MyCursor.
>
>Check also http://www.connectionstrings.com/?carrier=access
Previous
Reply
Map
View

Click here to load this message in the networking platform