Information générale
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
>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?
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement