Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Correct Syntax to SQL Server thru ODBC from VFP
Message
From
03/08/2004 09:46:00
 
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00929617
Message ID:
00930324
Views:
13
Morning Sergey,
I have a question about the double single quotes. Won't the program think that is a break and put the second part of the string into the next field?

On the text merge code, I put the code you gave below into my program, and my veriable lcSqlStr remained a empty string after moving through that code. What is the 'Pretext 7' do? Should I take it out?

Thanks for the help.
Beth

>Beth,
>
>There're two string literal delimiters: single and double quotes. The single quote is the one I would recomend to use. You've to double single quotes in the string literal if there's one. For example
WHERE name = 'O''Neil'
The double quote can also be used but it's an ANSI standard for identifier delimiters and it's interpretation by SQL server is controled by SET QUOTED_IDENTIFIER setting at parse time. See BOL for details.
>
>You can also consider using textmerge to build SPT statements. It makes code more readable and easier to maintain.
TEXT TO lcSql TEXTMERGE NOSHOW PRETEXT 7
>Insert into <<paKeys(2)>>  values ( <<CHRTRAN(pcInsertStr, ['], ['']>>)
>ENDTEXT
>
>
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform