problem in Inserting string in mysql databse

Hi all,

I am trying to insert string in mysql using java query.As I have taken field varchar,that should be in single quotes,whereas string is having double quotes...so as I am trying to insert data that gives null value all the time.

I did like:

String name=jTextFieldname.getText();

...

String sql="insert into record_master values (name,orderno,email,dob,address,mobile)";

Any pointers are appreciable.

Regards,

Palak

[501 byte] By [palak_shaha] at [2007-10-3 7:02:59]
# 1

Oh I got the sollution...Tat was something like:

String sql = "INSERT INTO record_master (name, orderno,email,dob,address,mobile,imeino) " +

"VALUES('" + name + "', '" + orderno + "','" + email + "','" + dob +"','" + address +"','" + mobile + "','" + imei + "')";

Regards,

Palak

palak_shaha at 2007-7-15 1:56:21 > top of Java-index,Developer Tools,Debugging and Profiling Tool APIs...