Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Retrieving data from MS Access mdb files
Message
From
11/11/2005 16:13:09
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Retrieving data from MS Access mdb files
Miscellaneous
Thread ID:
01067922
Message ID:
01067922
Views:
67
I've read several FAQs and postings, but I can't get it right.

Here's a representative attempt:

------------------ Start Code ----------------------------------
constring = "DBQ=c:\a_testing\ODBC\mytable.mdb;" ;
+ "Driver={Driver do Microsoft Access (*.mdb)};" ;
+ "DriverId=25;FIL=MS Access;" ;
+ "MaxBufferSize=2048;MaxScanRows=8;PageTimeout=5;"

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

sqlselect = "SELECT * FROM c:\a_testing\ODBC\mytable.mdb"

IF SQLEXEC(sqlHandler,sqlselect,"myCURSOR") <0
MESSAGEBOX("Error - Can't Execute....")
ENDIF
----------------- End of Code --------------------------------------

The SQLSTRINGCONNECT(constring) command seems to work fine (no error message).
I have also set it up using the wizard.

The problem is with the SQLEXEC(sqlHandler,sqlselect) command.
The error message appears.

Any suggestions?

Also, can anyone point me to the specs that explain the options in the "constring" definition above?


Thanks,
Next
Reply
Map
View

Click here to load this message in the networking platform