Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Working with Access97 MDB
Message
De
21/09/2000 14:04:10
 
 
À
21/09/2000 11:46:43
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00418887
Message ID:
00419193
Vues:
22
>Hi Al.
>
>
=SQLEXEC(nHandle, "SELECT <i>OneField</i> FROM <i>Table</i>", "Output")
What's the name of OneField? It might match a SQL reserved word, such as "Desc", which might be an abbreviation for "Description" but matches the "DESC" (descending) keyword). Try putting quotes around the field name and seeing if that works.
>
>Doug

In a roundabout way, your suggestion led to the answer. I don't have Access here; a client handed me an .MDB and said "read this in Fox". So, I ran the "SELECT * FROM ..." query to get the table structure. Some of the columns came across with names like "First_Name", "Last_Name", etc.

So, I blithely tried "SELECT First_Name FROM ..." with no success.

You've probably guessed it by now - the column name is "First Name", not "First_Name". Just where do those Jet programmers get off, anyways, supporting spaces in column names?

As you suggested, "SELECT 'First Name' FROM ..." works just fine.

Interestingly, AERROR() is pretty useless here - it reported "Connectivity error: < driver > Too few parameters. Expected 9." (maybe this is typical of ODBC errors :-/)

Thanks for the help.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform