several levels of quotes 
Author Message
 several levels of quotes

I want to write the following statement in a text file and I have a problem
with quotes.
Thank you for help.

the statement is :

sqlstat = "INSERT INTO Appels (numero, a_comp, a_qui)"
sqlstat = sqlstat & " VALUES (' "& int(exp_count)+1 &" ',,' "&comp_a&" ','
"&qui_a&" ');"

using the method writeline, I want to write this SQl statement in a text
file that will be in fact an .ASP file.
How to deal with the quotes while the writeline method also use double
quotes
ObjFile.writeline " text to be written "

I get very confused with that and would appreciate if someone could help me
to solve this problem.



Mon, 30 Dec 2002 03:00:00 GMT  
 several levels of quotes
Try this

dim q as string
q=chr(34)  'double quote

 sqlstat = "INSERT INTO Appels (numero, a_comp, a_qui)"
 sqlstat = sqlstat & " VALUES (" & q & int(exp_count)+1 &  ",, " & comp_a &
" , " & qui_a & q & " );"

I'm not sure of the actual syntax, but that may work.

steve


Quote:
> I want to write the following statement in a text file and I have a
problem
> with quotes.
> Thank you for help.

> the statement is :

> sqlstat = "INSERT INTO Appels (numero, a_comp, a_qui)"
> sqlstat = sqlstat & " VALUES (' "& int(exp_count)+1 &" ',,' "&comp_a&" ','
> "&qui_a&" ');"

> using the method writeline, I want to write this SQl statement in a text
> file that will be in fact an .ASP file.
> How to deal with the quotes while the writeline method also use double
> quotes
> ObjFile.writeline " text to be written "

> I get very confused with that and would appreciate if someone could help
me
> to solve this problem.



Mon, 30 Dec 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to cancel a large multiple level procedure from several levels in

2. Extract several words from string within quotes

3. Paths -- Creating File Path with several levels -- VBScript

4. Level 2 Quotes, Execution, Charts in Java, VB or C++

5. Three quotes level

6. three levels of quotes

7. quotes/double quotes -> how to have three levels???

8. Quotes within quotes

9. Double Quotes, Then Single Quotes, what comes next?

10. Double Quotes, Then Single Quotes, what comes next?

11. Double Quotes, Then Single Quotes, what comes next?

12. Double Quotes, Then Single Quotes, what comes next?

 

 
Powered by phpBB® Forum Software