Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
SQLEXEC and the underscore
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00615659
Message ID:
00615696
Views:
10
>Larry, I have also tried this on a field named "CLAIM_". The AERROR is returning: *** Column not found: CLAIM_
>
>I know the column exists, because I can use:
>QueryString = 'SELECT * FROM SOURCE WHERE RECORD_NUMBER= 15300'
>Results = SQLEXEC( handle, QueryString, 'TARGET')
>
>and this code returns 1 record with one of the columns being named CLAIM_
>
>The table I am pulling data from has several fields that end with an underscore which all give me the same headache.

I have seen VFP transform filed names to have "_" in them when the field had a space in it. Do the fields in question have ending spaces? If so, you may be able to encapsulate the field name in double quotes or [].

Ex.
QueryString = 'SELECT * FROM SOURCE WHERE [ID ] = 2514'
  or
QueryString = 'SELECT * FROM SOURCE WHERE "ID " = 2514'
Results = SQLEXEC( handle, QueryString, 'TARGET')

HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Reply
Map
View

Click here to load this message in the networking platform