Error in Inserting data in database
-
I've an application in which there is a form that insert data in some table. The problem is when i input some text having text with single quotes eg:- Don't, elicit error. strsql="Insert into lead(" &_ "deal1,"&_ "agreementno1"&_ ") values ("&_ "'"& x_deal1 &"',"&_ "'"& x_agreementno1 &"'"&_ ");" Set rs=objDataConn.Execute(strsql,,1) Amit Chowdhury
-
I've an application in which there is a form that insert data in some table. The problem is when i input some text having text with single quotes eg:- Don't, elicit error. strsql="Insert into lead(" &_ "deal1,"&_ "agreementno1"&_ ") values ("&_ "'"& x_deal1 &"',"&_ "'"& x_agreementno1 &"'"&_ ");" Set rs=objDataConn.Execute(strsql,,1) Amit Chowdhury
-
I've an application in which there is a form that insert data in some table. The problem is when i input some text having text with single quotes eg:- Don't, elicit error. strsql="Insert into lead(" &_ "deal1,"&_ "agreementno1"&_ ") values ("&_ "'"& x_deal1 &"',"&_ "'"& x_agreementno1 &"'"&_ ");" Set rs=objDataConn.Execute(strsql,,1) Amit Chowdhury
before insertting x_deal1 = Replace(xdeal1, "'", "''") x_agreementno1 = Replace(x_agreementno1, "'", "''") Thinking-Asking-Thinking