Results 1 to 2 of 2

Thread: Insert

  1. #1
    Join Date
    Dec 1969

    Default Insert

    I have an edit box. if I type some values like jo&#039;s (with an aphostrope) and try to insert into an access database its giving an error and without aphostrope it works fine.<BR>How to over come this problem.<BR><BR>sqlstatement="insert into CardInfo message values (&#039;"Message"&#039;);" <BR>dbConn.execute(sqlstatement)<BR>

  2. #2
    Join Date
    Dec 1969

    Default What you need

    to use is the Replace() function like this:<BR><BR>&#060;%<BR>Dim strMessage<BR>strMessage = Replace(Request.Form("Message"), "&#039;", "&#039;&#039;")<BR><BR>&#039;Then you can add the varaible "strMessage" in your SQL Query.<BR><BR>%&#062;

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts