text area problem

Results 1 to 3 of 3

Thread: text area problem

  1. #1
    Jason Stephens Guest

    Default text area problem

    I&#039m sure this is a simple one for ya&#039ll. What I have is a textarea in a form that I&#039m wanting to insert into a text field in a SQL database. The only problem is dealing with quotes. For instance if somebody types in the word don&#039t or won&#039t etc, the &#039 screws up the INSERT statement. There&#039s got to be an easy way to do this without stripping out all quotes and single quotes. Any help would be appreciated.

  2. #2
    Join Date
    Dec 1969

    Default little function to stop this problem

    here try this little function<BR>Function ChkString(string)<BR> if String = "" then string = " "<BR> string = replace(string, "&#039", "&#039&#039")<BR> ChkString = string<BR>End Function<BR><BR>then put it in the statement like this<BR><BR> StrSQl = "INSERT INTO Info (I_name) values (&#039"<BR> StrSql = ChkString(whateverthevalueis)<BR><BR>

  3. #3
    Jason Stephens Guest

    Default RE: little function to stop this problem

    Thanks, you rule....

Posting Permissions

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