I am currently working on a very simple project. But I am having problem with special characters. The one character which I find very annoying is ' . This single quote / aphostrophe is ruining my project while entering names like "James D'souza". Can anyone please help me in recording this special character in MS Access 2003 table? I need the 'insert' statement query or if not the vb.net coding along with the concerned event for recording the same. Thanks in advance.
bnitishpai
0
Newbie Poster
Recommended Answers
Jump to PostIn order to prevent errors on ' all you have to do is replace each ' with two '. Instead of using
name
use
name.Replace("'","''")
If you do that SQL won't complain.
Jump to Post' isn't a wildcard character. If you take the string "D'Souza" and change it to "D''Souza" then it will go into the table as "D'Souza".
All 7 Replies
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
bnitishpai
0
Newbie Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
bnitishpai
0
Newbie Poster
Reverend Jim
4,780
Hi, I'm Jim, one of DaniWeb's moderators.
Moderator
Featured Poster
bnitishpai
0
Newbie Poster
pedders
7
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.