Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLEXEC not working with variable as parameter
Message
From
24/11/2000 19:52:30
 
 
To
24/11/2000 19:11:48
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00445283
Message ID:
00445302
Views:
12
>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.
Previous
Reply
Map
View

Click here to load this message in the networking platform