General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>How do I extract records from an ACCESS file (.MDB) in VFP6? I've setup a local system DSN to the table in question and can SQLCONNECT to it ok, but SQLTABLES shows nothing, and a SQLEXEC(SqlHandle,"SELECT * FROM MYTABLE") results in an error telling me the filename is not found. But, of course, the filename is correct - I've even tried complete path and extension.
>
>Is there any way to "open" the ACCESS file directly from VFP? Or, what am I doing wrong with the ODBC connection?
>
>I do not have ACCESS so I can't just export from there... Any help appreciated.
>
>-Arne
You cannot setup a DSN to an Access table directly. You would set it up to the database file (*.mdb), and then do what you are doing in the SQLEXEC(). And it has to include the full path to the MDB.
The error is "filename not found"? Wouldn't it be the table?
Check the value of sqlhandle, if it's -1 then your connection did not went through. Can you post some code?
Previous
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