Simple yaar. Print the sql statement on your page. Copy paste the query ino your query analyser and see the error for yourself
Regards Purav Parekh -----Original Message----- From: A mailing list for discussion about Sun Microsystem's Java Servlet API Technology. [mailto:[EMAIL PROTECTED]] On Behalf Of anoop Sent: Monday, December 03, 2001 6:22 PM To: [EMAIL PROTECTED] Subject: Re: JDBC first see if u can query from ur program..then u may go for updating and other complicated things.. regards, anoop ----- Original Message ----- From: "Nandish Angadi" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Monday, December 03, 2001 5:05 PM Subject: Re: JDBC at present i am using msaccess for testing and i am using JDBC-ODBC bridge creating a dsn from the control panel's "ODBC Data Source 32 bit" -----Original Message----- From: Raghupathy, Gurumoorthy [SMTP:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 5:03 PM To: [EMAIL PROTECTED] Subject: Re: JDBC hi, can you tell me which databaase you are using....? and what is the odbc configuration details... guru -----Original Message----- From: Nandish Angadi [mailto:[EMAIL PROTECTED]] Sent: 03 December 2001 11:26 To: [EMAIL PROTECTED] Subject: Re: JDBC Hi guru, i tried with placing setAutoCommit(true) at all the possible place but the result is same Regards -----Original Message----- From: Raghupathy, Gurumoorthy [SMTP:[EMAIL PROTECTED]] Sent: Monday, December 03, 2001 4:55 PM To: [EMAIL PROTECTED] Subject: Re: JDBC hi, is the autocommit set to off at the biggening? if yes .... then use con.setAutoCommit( true ) before you execute the sql... or use the commit statement to explicilty commit the transaction. guru -----Original Message----- From: Nandish Angadi [mailto:[EMAIL PROTECTED]] Sent: 03 December 2001 11:17 To: [EMAIL PROTECTED] Subject: JDBC Hi all, I have a table with four data/time fields in the table. I want to insert a row and i am using the sql command as "insert into table_name values ({d \'yyyy-mm-dd\'},{d \'yyyy-mm-dd\'},{d \'yyyy-mm-dd\'},{d \'yyyy-mm-dd\'})".I do not get a compile error nor a runntime error, but when i check the database row is not inserted. here is the code Connection con; // creates a reference for Connection Class Statement st=null; // creates a reference for Statement Class ResultSet rs; try { Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); // define the Driver con = DriverManager.getConnection("jdbc:odbc:"+dns,dnsName,dnsPassword); // Get the Connection st = con.createStatement(); // Create Statement String sql = "Insert into Budget_Project_Definition values (12,{d \'2001-12-03\'})"; int result = st.executeUpdate(sql); System.out.println("A "+result); con.setAutoCommit(true); }catch(Exception e){ e.printStackTrace(); } Thanks in advance Nandish ________________________________________________________________________ ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ________________________________________________________________________ ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ________________________________________________________________________ ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ________________________________________________________________________ ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ________________________________________________________________________ ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html ________________________________________________________________________ ___ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
