Home Page for the TeradataForum
 
https:

Archives of the TeradataForum

Message Posted: Tue, 09 Sep 2008 @ 12:41:25 GMT


     
  <Prev Next>   <<First <Prev Next> Last>>  


Subj:   Re: JDBC autoCommit(false) question
 
From:   Jain, Nitin Pratap

David,

I could narrow the problem source to autoCommit() only after running a simple JDBC program which goes like this,

1. Register the driver using "com.ncr.teradata.TeraDriver" Driver class.

2. Create Connection object using DriverManager.getconnection(dbUrl, username, pwd)

3. Set autoCommit to false (conn.setAutoCommit(false));

3. Create Statement object.

4. Execute SELECT query using Statement object.

5. Perform commit (conn.commit())

6. Close statetement and close Connection.


I ran the program with different combinations. And finally I noticed that if setAutoCommit(false) line along with conn.commit() is commented, which means resorting to default behavior of commit happening after every db operation, the error msg stopped coming.

Regarding enviroment, I am using 12.0 Teradata JDBC driver and have TMODE set to TERA in dbUrl.


Thanks,

Nitin.



     
  <Prev Next>   <<First <Prev Next> Last>>  
 
 
 
 
 
 
 
 
  
  Top Home Privacy Feedback  
 
 
Copyright for the TeradataForum (TDATA-L), Manta BlueSky    
Copyright 2016 - All Rights Reserved    
Last Modified: 28 Jun 2020