Re: [SQL] INSERT query (using insert from a Java application, concerning String input)

Поиск
Список
Период
Сортировка
От Peter Garner
Тема Re: [SQL] INSERT query (using insert from a Java application, concerning String input)
Дата
Msg-id 19990218004614.5114.rocketmail@send205.yahoomail.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: "Brett W. McCoy"
Дата:
Сообщение: Re: [SQL] INSERT query (using insert from a Java application, concerning String input)
Следующее
От: David Martinez Cuevas
Дата:
Сообщение: Re: [SQL] Question about SQL FUnction