Inserting a backslash

From: Joe Ray (raymis_at_hotmail.com)
Date: 07/21/04

  • Next message: Chris: "Re: Inserting a backslash"
    Date: 21 Jul 2004 13:10:21 -0700
    
    

    I am trying to insert string data into my MySQL database. Some of the
    string data has a backslash as a character. I tried to make a simple
    insert of a backslash into the database using the following statement
    in java. Notice that i used two backslashes.

    stmt.executeUpdate("INSERT INTO DICTIONARY VALUES('\\')");

    However the database did not accept that I received an SQL exception.
    I am stumped. Any suggestions? Thanx in advance

    Joe


  • Next message: Chris: "Re: Inserting a backslash"

    Relevant Pages

    • Re: How do I update child keys when I update their string data?
      ... over two separate queries and link them with a DataRelation. ... > and give users the ability to edit the database. ... how do I use the new string data values to update ... > the child keys that need to be returned to the database? ...
      (microsoft.public.dotnet.framework.adonet)
    • Re: String variable read from Mysql DB + echo = Newline problem
      ... The string already has single backslash in the database. ... And BTW - you cannot exactly control formatting on the user's browser. ...
      (comp.lang.php)
    • Re: about insert data....
      ... Since you did not supply the database you are using I will supply an example using dynamic SQL. ... I assume that the three fields are string data. ... The strings are surrounded by apostrophes. ...
      (microsoft.public.vb.database.ado)
    • CLongBinary data truncation
      ... I am using ODBC with mfc. ... I have a field varbinary in database, ... 8000 bytes it gives me "String data, ... SetFieldDirty; ...
      (microsoft.public.vc.database)
    • Re: Remove double backslash in string "c:\test"
      ... Are you sure there are two backslashes, or is that just the escaping ... the escaping backslash. ... But in my program I need to compare it to a string from the database: ...
      (comp.lang.ruby)