Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Apostrophe's and Quotation Marks in SQL Server

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2001-07-07 : 10:06:57
Jonny writes "How do I use the replace statement to allow my text boxes to accept Apostrophe's with giving me error messages when i run VB. Below is the code and statement I used and I am still getting error messages.

sSQL = "Insert into Wellness(FirstName, LastName, Dat, Need," _
& "Dept, Room, Prob)" _
& "Values('" & txtFname.Text & "','" & txtLname.Text & "','" & txtDat.Text & "','" & cboNeed.Text & "','" _
& cboDept.Text & "','" & txtRoom.Text & "','" & txtProblem.Text & "','" & Replace(txtProblem.Text, "'", "''") & "');""
   

- Advertisement -