Subject Re: [Firebird-Java] Re: how to insert??
Author Daniel Bertin
the ? gives a error

java.lang.nullPointerException"


At 02:16 PM 7/31/2003 -0300, you wrote:
>Thanks
>
>What does the ? do.
>(VALUES ?, 'NOW', ?)
>
>
>
>
>At 03:31 PM 7/31/2003 +0000, you wrote:
> > > 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
> >
> >
> >Yahoo! Groups Sponsor
> >ADVERTISEMENT
> ><<http://rd.yahoo.com/M=256694.3651271.4917408.1261774/D=egroupweb/S=1705
> 006764:HM/A=1688501/R=0/SIG=11if1rb57/*http://webevents.yahoo.com/universal/seabiscuit/>http://rd.yahoo.com/M=256694.3651271.4917408.1261774/D=egroupweb/S=1705006764:HM/A=1688501/R=0/SIG=11if1rb57/*http://webevents.yahoo.com/universal/seabiscuit/>2a5e1d68.jpg
>
> >
> >2a5e1de5.jpg
> >
> >To unsubscribe from this group, send an email to:
> >Firebird-Java-unsubscribe@yahoogroups.com
> >
> >
> >
> >Your use of Yahoo! Groups is subject to the
> ><<http://docs.yahoo.com/info/terms/>http://docs.yahoo.com/info/terms/>Yah
> oo! Terms of Service.
>
>Yahoo! Groups Sponsor
>ADVERTISEMENT
><http://rd.yahoo.com/M=259538.3625325.4914071.1261774/D=egroupweb/S=1705006764:HM/A=1695348/R=0/SIG=11u38u3s2/*http://hits.411web.com/cgi-bin/hit?page=1374-105951838331032>2a6fa794.jpg
>2a6fa7d3.jpg
>
>To unsubscribe from this group, send an email to:
>Firebird-Java-unsubscribe@yahoogroups.com
>
>
>
>Your use of Yahoo! Groups is subject to the
><http://docs.yahoo.com/info/terms/>Yahoo! Terms of Service.