Insert the current dateTag(s): JDBC

It's good idea to use the JDBC escape function instead of using a specific DBMS function. This way, your code will be portable.
sql = "INSERT INTO CUSTOMERS VALUES("
    + "'" + custName + "'" + ","
    + "'" + custPhone   + "'" + ","
    + "  {fn now() }  )";   



If you find this article useful, consider making a small donation
to show your support for this Web site and its content.

Written and compiled by Réal Gagnon ©1998-2012
[ home ]