Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

searching for the quotation mark

Status
Not open for further replies.

daveigh

Programmer
Oct 9, 2003
105
i am currently setting up a forum with the feature of quoting a specific reply. my idea is using the InStr function:

response.Write InStr(rs("forum_reply_message"), """)

thru that i can count the number of characters and show & manipulate it, but i get a "Unterminated string constant" error. how can I search for double quotation marks inside a recordset value? i have tried using " but it won't work the same.

______________CRYOcoustic_____________
 
>[tt]response.Write InStr(rs("forum_reply_message"), """)
[/tt]
[tt]response.Write InStr(rs("forum_reply_message"), "[highlight]""[/highlight]")[/tt]
 
Either use four quotation marks in a row, or use Chr(34).

The reasoning behind the 4 quotes is this: The first one opens the string, the next 2 signify the quotation mark, and the last closes the string.

Lee
 
got it dudes, gonna try it now =)

______________CRYOcoustic_____________
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top