Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Saving text with apostrophes
Message
From
22/01/2001 18:32:19
 
 
To
All
General information
Forum:
Internet
Category:
Active Server Page
Title:
Saving text with apostrophes
Miscellaneous
Thread ID:
00467048
Message ID:
00467048
Views:
42
How do I programmatically save text with apostrophes in MSSQL text-field?

For example:

Set dbLogin = Server.createobject("ADODB.Connection")
dbLogin.Open Session("gDB_ConnectionString")

strText = "Here's your feedback"

strSQL = "INSERT INTO Feedback "
strSQL = strSQL & "(message, enteredby) VALUES "
strSQL = strSQL & "('" & Request.Form("txtMessage") & "', "
strSQL = strSQL & "'" & Trim(CStr(Request.Form("txtEnteredBy")))
strSQL = strSQL & " at " & Session("Username") & "')"

dbLogin.Execute(strSQL)

TIA.
It's "my" world. You're just living in it.
Next
Reply
Map
View

Click here to load this message in the networking platform