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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

get around apostrophies

Status
Not open for further replies.

chappi

Technical User
Aug 29, 2001
42
US
How can I get around the issue with apostrophies. I have an access database and wrote an ASP.NET front-end to it. But when I try to enter something with an apostrophy (like a name) the querystring breaks. I know with SQL Server you can use parameters, but I'm not sure about Access.
Any thoughts?

J
 
From our well respected expert link9 (Paul) provided the following solutin some time ago:

Dim strSite As String
strSite = lblSite.Text
strSite = strSite.Replace("'","''")

...this effectively removes the apostrophie but when you insert the record in a table, the apostrophie comes back intact.
 
Thanks. I also just saw a post that answered a similar question. Thanks anyways for your quick response :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top