Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Opening ACCESS file...
Message
De
14/08/2001 09:52:01
 
 
À
13/08/2001 17:49:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Base de données, Tables, Vues, Index et syntaxe SQL
Divers
Thread ID:
00543273
Message ID:
00543479
Vues:
15
>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
Fil
Voir

Click here to load this message in the networking platform