Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Querying against Access database
Message
From
07/02/2008 02:30:09
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9
OS:
Windows XP SP2
Network:
Windows XP
Database:
Jet/Access Engine
Miscellaneous
Thread ID:
01290269
Message ID:
01290306
Views:
17
>Hi all,
>
>I'm having a problem querying from an Access table. When the table was setup by another organization, they have the fields such as "testing for a field" is the field name...
>
>I get a connection no problem, I can query other fields from the table, but even on OTHER fields that only have a single space, and qualifying them in the query as ...
>
>select "Some FIeld" as MyVFPFld from "Table 1"
>
>works through a SQLEXEC() call
>
>However, if
>
>select "Some Other Field" as MyFld from "Table 1" -- WORKS
>
>Strange, but the failure will ONLY FAIL if the field name as " TO " as part of it.. ie:
>
>select "AMT TO REFUND" as MyField from "Table 1" -- FAILS

How about
select [AMT TO REFUND] as MyField from [Table 1]
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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform