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

how to save a data with ' in between into database using Microsoft Jet

Status
Not open for further replies.
Apr 24, 2003
3
MY
i use microsoft jet oledb to connect to my database. currently i my program is ok,but when i want to add/save a data,for exmaple a name which have ' (such as Ch'ng),the system wont allow it,because of the '. is there anyway to write the code that can allow me to save data with ' ?
below is some pieces of my code :

rsSearch.Open " SELECT MemberNo FROM Member WHERE MemberNo = '" & txtmemberno & "' ", ncrConnect, adOpenDynamic, adLockPessimistic

ncrConnect.Execute "INSERT INTO Member (MemberNo, MemberNo1, Name)" _
& "VALUES ('" & txtmemberno & "', '" & txtmemberno1 & "', '" & txtenglishname & "')"

anyone knows,pls help!! thanks

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top