Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2003
    Posts
    15

    Arrow Unanswered: little problem..

    hey guys, i have a little problem:

    i use ASP with MSSQL and i have a query that adds these values to the database:

    values(' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ')

    when a value is empty, the fields are not filled
    but when a value contains a single quote ('), that quote ends the value:

    values(' hel'lo ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ')


    so my question is, how can i make the quote (') in hel'lo .. invisible or something, so MSSQL wont see it as the end of the value.


    (im MYSQL, you can just place a (\) in front of the (') but that doenst work in MSSQL...)
    Last edited by bertwasbeer; 12-03-03 at 11:21.

  2. #2
    Join Date
    Sep 2003
    Location
    New York, NY
    Posts
    136
    use like this :

    values(' hel''lo ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ')

    -Rohit

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    149
    Use one more single quote as the escape character.

  4. #4
    Join Date
    Oct 2003
    Posts
    15
    thanx lads!

Posting Permissions

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