hi Guys,I am getting the following error when I am trying to execute the query:
'Select getDate()'getDate is a function which returns the system date. The query works perfectly fine when run from query analyser and most of the times from within the application as well. But some times it throws the following error. I am having multiple threads executing the above query.It seems to be a bug in the driver. Any idea/workaround ???I am using jdk 1.3.1 and SQL Server 2000
cheers,
##################################################################
java.lang.NullPointerException
at com.microsoft.jdbc.base.BaseImplStaticCursorResultSet.setupTempFiles(Unknown Source)
at com.microsoft.jdbc.base.BaseImplStaticCursorResultSet.<init>(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.chainInServiceImplResultSets(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.getNextResultSet(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.commonGetNextResultSet(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeQueryInternal(Unknown Source)
at com.microsoft.jdbc.base.BaseStatement.executeQuery(Unknown Source)
at com.sanderson.tallyman.util.TallymanDB.executeQuery(Unknown Source)
at com.sanderson.tallyman.util.TallymanDB.getCurrentDate(Unknown Source)
at com.sanderson.tallyman.operations.interfaces.RecordUpdateControl.updateRecord(Unknown Source)
at com.sanderson.tallyman.operations.interfaces.DebtInterfaceControl.processUpdate(Unknown Source)
at com.sanderson.tallyman.operations.interfaces.DebtInterfaceControl.processInterface(Unknown Source)
at com.sanderson.tallyman.operations.interfaces.InterfaceHandler$ProcessRecord.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)使用代码如下:
    Connection conn=null;
    PreparedStatement pstmt=null;
    PreparedStatement pstmt1=null;
    ResultSet rs1=null;    
    DataBase db=new DataBase();    
String strSQL="select user_id from t_user";
                 conn=db.getConn() ;
                 pstmt=conn.prepareStatement(strSQL,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE) ;   
                 rs1=pstmt.executeQuery();
    while (rs1.next() ){
      out.println("Now:"+rs1.getString(1)) ;
    }
    rs1.close() ;
    //dataBase1.closeDB() ;                 
但是去掉
                 pstmt=conn.prepareStatement(strSQL,ResultSet.TYPE_SCROLL_INSENSITIVE,ResultSet.CONCUR_UPDATABLE) ;
改为                 pstmt=conn.prepareStatement(strSQL) ;
就可以,但是不能用rs1.last();等
这个现象在jdk1.3/jdk1.4+tomcat40出现,以前好象正常过,但是用resin2.12+jdk1.3就可以,不知道为什么。各位给于意见。