Results 1 to 2 of 2

Thread: [RESOLVED] [2008] SQL Problem:Incorrect syntax

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jun 2008
    Location
    Macedonia
    Posts
    188

    Resolved [RESOLVED] [2008] SQL Problem:Incorrect syntax

    When i add to data base from textbox i have problem and the problem is that in the text have the charachter " ' " "Dont be stupid' be smart", and have error.
    How to resolve this error. Can i resolved with replace or another solution.

    Tnx to all who help me sry for my bad english and iam beginer at SQL.

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: [2008] SQL Problem:Incorrect syntax

    That is a common issue, and sooner or later it will probably be followed by other similar ones.. unless you switch from putting values into a string to using parameterised queries, which automatically deal with the ' issue and others.

    There are some examples of how to use them in this thread (the code snippets that include the keyword Parameters).

Posting Permissions

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



Click Here to Expand Forum to Full Width