Re: [SQL] INSERT query (using insert from a Java application, concerning String input) - Mailing list pgsql-sql

From Peter Garner
Subject Re: [SQL] INSERT query (using insert from a Java application, concerning String input)
Date
Msg-id 19990218004614.5114.rocketmail@send205.yahoomail.com
Whole thread Raw
List pgsql-sql
Hi Atika!  :-)

> I am basically trying to do something like this:
>
> String input = "This is a String";
>
> myConn.updateQuery("insert into myDB values(input)");
>
> but get an error when I  run it saying:
> ERROR:  attribute input not found
> java.sql.SQLException: ERROR:  attribute input not found

Try

String input = "This is a String"
String query = insert into myDB value ('" + input + "')"

myConn.updateQuery(query);
==
Peace,
Peter

We are Microsoft of Borg, you will be assimilated!!!
Resistance is fut...  ***BZZZRT***  THUD!!!
[General Protection Fault in MSBorg32.DLL]
Please contact the vendor for more information
_________________________________________________________
DO YOU YAHOO!?
Get your free @yahoo.com address at http://mail.yahoo.com


pgsql-sql by date:

Previous
From: "Brett W. McCoy"
Date:
Subject: Re: [SQL] INSERT query (using insert from a Java application, concerning String input)
Next
From: David Martinez Cuevas
Date:
Subject: Re: [SQL] Question about SQL FUnction