List:MySQL and Java« Previous MessageNext Message »
From:Oana  Radulescu Date:April 29 1999 5:01pm
Subject:insert variables
View as plain text  
Hi!

I am having difficulty creating an insert statement in Java that would
use variable values as the values parameters.

None of the following worked -- I would get either the name of the
variable instead of the value or nothing at all:

String value1 = new String("blah");

insert into table values (value1);
 or
insert into table values ('value1');
 or
insert into table values ("value1");
 or
insert into table values (\'value1\');
 or
insert into table values (\"value1\");

The context in which I need to use this is more complex than building an 
object string from a known value. 

I hope that someone will be able and willing to help.

Thank you in advance !

Oana 

Thread
insert variablesOana Radulescu29 Apr
  • RE: insert variablesMark Matthews29 Apr
  • Re: insert variablesRITESH BISWAS30 Apr
    • Re: insert variablesAmbrose Li30 Apr
      • Re: insert variablesmmatthew30 Apr
      • Re: insert variablesTim Endres30 Apr