Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SQLEXEC not working with variable as parameter
Message
De
24/11/2000 19:52:30
 
 
À
24/11/2000 19:11:48
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00445283
Message ID:
00445302
Vues:
21
>lcSQL = 'Select * from Person'
>
>Contents of laError:
>[1,1] 1526
>[1,2] [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'Person'.
>[1,3] [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'Person'.
>[1,4] S0002
>[1,5] 208
>[1,6] 13
>[1,7] NULL
>
>Sounds like my table name's not specified correctly. I've also tried person.dbf, dbo.person, dbo.peraon.dbf. I'm obviously not specifying the backend table name correctly. This is an upsized VFP database, and the original table in question is person.dbf, in case you hadn't guessed :-)

Have you tried simply 'person'? The SQL Server may be configured to be case sensitive.
BTW: person.dbf won't ever work - the DBF is only good under VFP (or a dBase language)

To make sure you have the correct table names, you can get them by using
SQLTABLES(lnHandle, "Table"). The table_name field has the name as it should be referred to.

Also, check your ODBC connection to make sure the Default database is correct.
Insanity: Doing the same thing over and over and expecting different results.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform