General information
Category:
Coding, syntax & commands
Title:
Retrieving data from MS Access mdb files
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only