Subject Re: how to insert??
Author Roman Rokytskyy
> How do I insert a java variable with jaybird? :variable gives me an
> error
>
> INSERT INTO TABLE (FIELD1,DATEFIELD2,FIELD3)
> VALUES (:variable1,'NOW', :variable2)
>

If you use java.sql.PreparedStatement, use following:

PreparedStatement stmt = con.prepareStatement(
"INSERT INTO my_table(field1, datefield2, field3) " +
"VALUES (?, 'NOW', ?)");

stmt.setString(1, someValueOfTheField1);
stmt.setInt(2, someValueOfTheField3);

stmt.excecute(); // or stmt.executeUpdate();

Best regards,
Roman Rokytskyy