I and using mysql-jdbc to do some program.
I can insert record to my db by following code:
-----------------------------------------------------
stmt.executeUpdate("insert into apidbusers values('id',
'jp','zhu','em1','jian180')");
-------------------------------------------------------
but
if i use
--------------------------------------------------------------
String str="id";
stmt.executeUpdate("insert into apidbusers values(str, 'jp',
'zhu','em1','jtan180')");
-------------------------------------------------------------
it fails.
why? how can i use java java string to insert a record?
Thanks
--------------------------------
Jianping Zhu
Department of Computer Science
Univerity of Georgia
Athens, GA 30602
Tel 706 5423900
--------------------------------
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php