Yes, I understand. However, if a string to be inserted in the database is
input by the user, then special characters (quotes, tabs, newlines,
backslashes) must be escaped with a backslash before the string can be used
in an SQL INSERT statement. Is there any existing method for
auto-backslashing a string, or is this something I'll have to handle
----- Original Message -----
From: "Peter Hearty" <firstname.lastname@example.org>
Sent: Monday, November 01, 1999 1:50 AM
> In InstantDB you have to escape quotes in strings using a backslash: \" or
> \'. See types.html in your InstantDB docs for details.
> Peter Hearty
> Instant Computer Solutions
> -----Original Message-----
> From: Kevin Yank <email@example.com>
> To: firstname.lastname@example.org <email@example.com>
> Date: 31 October 1999 16:21
> >Hi, there!
> >The following code is fairly basic:
> > Statement statement = dbConnection.createStatement();
> > String sqlQuery = "INSERT INTO Settings VALUES (\"UserName\", \"" +
> > statement.executeUpdate(sqlQuery);
> > statement.close();
> >However, if the String object "name" contains a double quote ("), the
> >thing comes crashing down. I seem to recall there being a simple way
> >this... Some automatic means of escape-encoding a String before plugging
> >into an SQL statement, perhaps?
> >I know that using a prepared statement would work, but I'd like to avoid
> >this if possible in this case.
> >-Kevin Yank.
> >To unsubscribe from this list, please an send
> >email to 'firstname.lastname@example.org' with the text
> >'unsubscribe instantdb' in the message body.
> To unsubscribe from this list, please an send
> email to 'email@example.com' with the text
> 'unsubscribe instantdb' in the message body.
To unsubscribe from this list, please an send
email to 'firstname.lastname@example.org' with the text
'unsubscribe instantdb' in the message body.