Friends Problem in SQL statement

Results 1 to 2 of 2

Thread: Friends Problem in SQL statement

  1. #1
    Prashanth Guest

    Default Friends Problem in SQL statement

    Friends I have written a SQL query to insert records into SQL SERVER database table. I have a field "name" If i enter characters, it enters data into the database table, but if I give the special characters such as " or &#039 in the name field it is giving me database error as shown below<BR><BR>Microsoft OLE DB Provider for ODBC Drivers error &#039 80040e14&#039 <BR><BR>[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near &#039asdfjsklfj&#039. <BR><BR>how to rectify this error <BR><BR>

  2. #2
    Jesus Guest

    Default RE: Friends Problem in SQL statement

    Hi,<BR>If your sentence is something like this:<BR> "insert into table_name(field) values(&#039John&#039s car&#039)" <BR><BR>you must write two &#039, I mean:<BR> "insert into table_name(field) values(&#039John&#039&#039s car&#039)".<BR><BR>The same for double quotes: "

Posting Permissions

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