Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating SQL to pass to SQL Server or Oracle
Message
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00566215
Message ID:
00566255
Views:
12
If something is repeated three times, it becomes more important and deserves more attention :)

>Upgrade to VFP 7 and you can use
TEXT TO VarName
If it's not an option give me your email addres and I'll send you my function that allows to do the same in VFP 6.
>
>>I am connecting to an Oracle back-end and have to create my SQL as a string and pass that string to Oracle. That makes my code look like this:
>>
>>SQLcmd = "SELECT * FROM TABLE1 T1 " + ;
>>"WHERE T1.field1 = " + MyFoxVariable1 + ;
>>" AND T1.field2 = " + MyFoxVariable2
>>and so on...
>>
>>I'd rather be able to use TEXT...ENDTEXT or something to look like:
>>TEXT
>> SELECT * FROM TABEL1 T1
>> WHERE T1.field1 = <>
>> AND T1.field2 = <>
>>ENDTEXT
>>
>>The problem is that the TEXT goes to the printer or a text file.
>>Does anyone have a better idea?
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform