ODBC - SQLException

Hi,
I'm having a problem with an ODBC connection that tells:
"SQLException:[Microsoft][ODBC Driver Manager]
Error in function sequence".
I do'nt have idea on what can be the mistake. Here is my code:
public class LeerFila extends JFrame {
MSConnection Conecta;
Connection con;
String[] NombreColumnas = {"Dato","Valor"};
static String[][] DatosdelasColumnas = null;
public LeerFila(Element oElement, String Tabla) {
final JFrame frame = new JFrame("Informaci�n");
try {
Conecta = getMSConnection();
if (Conecta == null) {
System.out.println("No existe conexi�n v�lida");
return;
con = Conecta.getConnection();
ResultSet Resultado;
int numcolumnas;
Resultado = oElement.getDatabaseRow(Conecta, Tabla);
numcolumnas = Resultado.getMetaData().getColumnCount();
System.out.println("\n \n El n�mero de columnas es: " + numcolumnas + "\n");
String[][] DatosColumnas = new String[numcolumnas][2];
for (int i = 1; i <= numcolumnas; i++){
DatosColumnas[i-1][0] = new String (Resultado.getMetaData().getColumnName(i));
     String ValorColumna = Resultado.getString(i);
     if (ValorColumna != null)
     DatosColumnas[i-1][1] = new String (ValorColumna);
     else
     DatosColumnas[i-1][1] = "";
System.out.println("Columna: " + DatosColumnas[i-1][0] + " -> " + DatosColumnas[i-1][1]);
Resultado.close();
con.close();
for(int i= 0;i<numcolumnas;i++) {
DatosdelasColumnas[i] = DatosColumnas;
catch (SQLException ex) {
// A SQLException was generated. Catch it and
// display the error information. Note that there
// could be multiple error objects chained
// together
System.out.println ("\n*** SQLException caught ***\n");
ex.printStackTrace();
catch (java.lang.Exception ex) {
// Got some other type of exception. Dump it.
System.out.println ("\n*** java.lang.Exception caught ***\n");
ex.printStackTrace ();
JTable tabla = new JTable (DatosdelasColumnas, NombreColumnas);
tabla.setPreferredScrollableViewportSize(new Dimension (500,70));
TableColumn column = tabla.getColumnModel().getColumn(1);
column.setPreferredWidth(150);
JScrollPane panelotabla = new JScrollPane(tabla);
frame.getContentPane().add(panelotabla);
frame.addWindowListener(new WindowAdapter() {
     public void windowClosing(WindowEvent e) {
          try {
               frame.dispose();System.runFinalization();System.exit(0);
} catch (java.lang.SecurityException ex) {}
frame.pack();
frame.setVisible(true);
/*catch (DatabaseLink.Exception dble) {System.out.println(dble);
private MSConnection getMSConnection(){
Conecta = null;
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
catch (java.lang.ClassNotFoundException e) {
System.out.println (e);
try {
String url = "jdbc:odbc:estivella";
Connection oConnection = DriverManager.getConnection(url, null, null);
Conecta = new MSConnection(oConnection);
catch (SQLException ex) {
System.out.println ("\n*** SQLException caught ***\n");
while (ex != null) {
System.out.println ("SQLState: " +
ex.getSQLState ());
System.out.println ("Message: " + ex.getMessage ());
System.out.println ("Vendor: " +
ex.getErrorCode ());
ex = ex.getNextException ();
System.out.println ("");
return Conecta;

thanks for your answer,
I have tried that before and it didn't work. It is sure that the error you mentioned above exists but, there should be another one.
thanx.

Similar Messages

  • Unified CM Telephony Subsystem OUT OF SERVICE

    CM 8.03
    CCX 8.0.2
    Data Check - everything is ОК.
    Data Resync - i've done anyway
    Status Cisco JTAPI Resync is completed
    Cisco JTAPI Client
    Node ID: 1 -- Cisco JTAPI Client versions are consistent
    Node ID: 2 -- Cisco JTAPI Client versions are consistent
    I've rebooted one CCX recently
    Status of CCX Engine on both servers is the same:
    Cisco Unified CCX Engine PARTIAL SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Manager Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Expression Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Document Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Bootstrap Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    File Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Socket Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Log Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Config Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Cluster Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Session Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    User Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Script Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    RTP Port Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Prompt Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Channel Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Grammar Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Application Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Contact Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Executor Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Archive Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Database Manager IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Subsystem Manager PARTIAL SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    MRCP ASR Subsystem NOT CONFIGURED Not Started Not Started
    Unified CM Telephony Subsystem OUT OF SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Core RTR Subsystem IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    CMT Subsystem IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    eMail Subsystem NOT CONFIGURED Not Started Not Started
    RmCm Subsystem IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    MRCP TTS Subsystem NOT CONFIGURED Not Started Not Started
    Voice Browser Subsystem IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    HTTP Subsystem IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Outbound Subsystem IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    VOIP Monitor Subsystem IN SERVICE FRI DEC 2 11:00:04 2011 00 Days 00:02:27
    Database Subsystem NOT CONFIGURED Not Started Not Started
    Here is what I find in RTMT System Logs messages. I don't know if it refers to Unified CM Telephony Subsystem OUT OF SERVICE
    : SDIDBConfigData:Read failed. odbc:SQLException = Failed to connect to datasource: [Informix][Informix ODBC Driver][-11302] Insufficient Connection information was supplied, ProcessNodeId=Failed to connect to datasource: [Informix][Informix ODBC Driver]
    Help me to troubleshoot

    Dear Anchhoudh
    below is the output from data and jtapi resync.
    Unified CM Telephony Users
    jtapi_1 -- Ok
    Unified CM Telephony Port Groups
    Port Group 0
    CTI ports on node 1 -- Ok
    CCM Data
    Device Pool--Ok
    Media Resource Group List-- Ok
    PresenceGroup-- Ok
    Partition-- Ok
    User Hold Audio Source-- Ok
    Alerting Name Ascii-- Ok
    Require DTMF Reception-- Ok
    NetWork Hold Audio Source-- Ok
    CallPickUpGroup-- Ok
    VoiceMailProfile-- Ok
    AAR Group-- Ok
    Location-- Ok
    Calling Search Space-- Ok
    Unified CM Telephony Triggers
    AA
    AA -- Ok
    CCM Data
    Forward Busy Calling Search Space-- Ok
    Device Pool-- Ok
    Alerting Name Ascii-- Ok
    PresenceGroup-- Ok
    Partition-- Ok
    CallPickUpGroup-- Ok
    VoiceMailProfile-- Ok
    Location-- Ok
    Calling Search Space-- Ok
    AA-1
    AA-1 -- Ok
    CCM Data
    Forward Busy Calling Search Space-- Ok
    Device Pool-- Ok
    Alerting Name Ascii-- Ok
    PresenceGroup-- Ok
    Partition-- Ok
    CallPickUpGroup-- Ok
    VoiceMailProfile-- Ok
    Location-- Ok
    Calling Search Space-- Ok
    AA-2
    AA-2 -- Ok
    CCM Data
    Forward Busy Calling Search Space-- Ok
    Device Pool-- Ok
    Alerting Name Ascii-- Ok
    PresenceGroup-- Ok
    Partition-- Ok
    CallPickUpGroup-- Ok
    VoiceMailProfile-- Ok
    Location-- Ok
    Calling Search Space-- Ok
    AutoAttendant-3
    AutoAttendant-3 -- Ok
    CCM Data
    Forward Busy Calling Search Space-- Ok
    Device Pool-- Ok
    Alerting Name Ascii-- Ok
    PresenceGroup-- Ok
    Partition-- Ok
    CallPickUpGroup-- Ok
    VoiceMailProfile-- Ok
    Location-- Ok
    Calling Search Space-- Ok
    and jtapi resync
    Cisco JTAPI Client
    Node ID: 1 -- Cisco JTAPI Client versions are consistent
    Thanks

  • Java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Unspecified error

    Hi All,
    I am getting the following error when i am running swing program. I have a large volume of data. My resultset is running upto 2 hours. after 2 hours process is stoped and i got the following error on console.I am using Swing and MS SQL Server 2000.
    Exception :java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Unspecified error occurred on SQL Server. Connection may have been terminated by the server.
    Exception :java.sql.SQLException: General error
    GenerateAuditBatches.java sql 4 : select count(*) from tblTransaction where AuditID = 10001720 and     ExcludedFromAudit = 'F' and     SystemPricedFare = 'F'
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.lang.Exception: Invalid handle [null] Database error code:0
    GenerateAuditBatches.java sql 5 transactions : select tblTransaction.BatchID,          tblTransaction.TransactionNumber,          tblTransaction.PrimeDocumentNumber,          tblTransaction.AgentIATACode,          tblTransaction.NetRemitInd,          tblTransaction.ITBTFare,          tblTransaction.TourCode,          tblTransaction.FareBasis,          tblTransaction.TransactionCode,          tblTransaction.TransactionCategory,          tblTransaction.InternationalOrDomestic,          tblTransaction.NumberOfSectors,          tblTransaction.TransactionStatus,          tblTransaction.TransactionStatusUserID,          tblTransactionCRSCheck.FareCorrect,          tblTransactionCRSCheck.TaxCorrect,          tblTransactionCRSCheck.CommissionCorrect,          tblTransactionCRSCheck.ContractRulesCorrect,          tblTransactionCRSCheck.ContractID from tblTransaction left join tblTransactionCRSCheck on     tblTransactionCRSCheck.AuditID = tblTransaction.AuditID and     tblTransactionCRSCheck.TransactionNumber = tblTransaction.TransactionNumber where tblTransaction.AuditID = 10001720 and     tblTransaction.ExcludedFromAudit = 'F' and     tblTransaction.SystemPricedFare = 'F' order by tblTransaction.FareBasis
    Exception :java.sql.SQLException: Invalid handle
    java.lang.Exception: Invalid handle [null] Database error code:0
         at com.select.auditlink.GenerateAuditBatches.batchTransactions(GenerateAuditBatches.java:966)
         at com.select.auditlink.GenerateAuditBatches.batchAudit(GenerateAuditBatches.java:464)
         at com.select.auditlink.GenerateAuditBatches.run(GenerateAuditBatches.java:169)
    Exception :java.sql.SQLException: General error
    java.lang.Exception: Invalid handle [null] Database error code:0
         at com.select.auditlink.GenerateAuditBatches.batchTransactions(GenerateAuditBatches.java:966)
         at com.select.auditlink.GenerateAuditBatches.batchAudit(GenerateAuditBatches.java:469)
         at com.select.auditlink.GenerateAuditBatches.run(GenerateAuditBatches.java:169)
    GenerateAuditBatches.java sql 4 : select count(*) from tblTransaction where AuditID = 10001720 and     ExcludedFromAudit = 'F' and     SystemPricedFare = 'F'
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.lang.Exception: Invalid handle [null] Database error code:0
    GenerateAuditBatches.java sql 5 transactions : select tblTransaction.BatchID,          tblTransaction.TransactionNumber,          tblTransaction.PrimeDocumentNumber,          tblTransaction.AgentIATACode,          tblTransaction.NetRemitInd,          tblTransaction.ITBTFare,          tblTransaction.TourCode,          tblTransaction.FareBasis,          tblTransaction.TransactionCode,          tblTransaction.TransactionCategory,          tblTransaction.InternationalOrDomestic,          tblTransaction.NumberOfSectors,          tblTransaction.TransactionStatus,          tblTransaction.TransactionStatusUserID,          tblTransactionCRSCheck.FareCorrect,          tblTransactionCRSCheck.TaxCorrect,          tblTransactionCRSCheck.CommissionCorrect,          tblTransactionCRSCheck.ContractRulesCorrect,          tblTransactionCRSCheck.ContractID from tblTransaction left join tblTransactionCRSCheck on     tblTransactionCRSCheck.AuditID = tblTransaction.AuditID and     tblTransactionCRSCheck.TransactionNumber = tblTransaction.TransactionNumber where tblTransaction.AuditID = 10001720 and     tblTransaction.ExcludedFromAudit = 'F' and     tblTransaction.SystemPricedFare = 'F' order by tblTransaction.FareBasis
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.sql.SQLException: Connection is closed
    GenerateAuditBatches.java sql 4 : select count(*) from tblTransaction where AuditID = 10001720 and     ExcludedFromAudit = 'F' and     SystemPricedFare = 'F'
    java.lang.Exception: Invalid handle [null] Database error code:0
         at com.select.auditlink.GenerateAuditBatches.batchTransactions(GenerateAuditBatches.java:966)
         at com.select.auditlink.GenerateAuditBatches.batchAudit(GenerateAuditBatches.java:474)
         at com.select.auditlink.GenerateAuditBatches.run(GenerateAuditBatches.java:169)
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.lang.Exception: Invalid handle [null] Database error code:0
    GenerateAuditBatches.java sql 5 transactions : select tblTransaction.BatchID,          tblTransaction.TransactionNumber,          tblTransaction.PrimeDocumentNumber,          tblTransaction.AgentIATACode,          tblTransaction.NetRemitInd,          tblTransaction.ITBTFare,          tblTransaction.TourCode,          tblTransaction.FareBasis,          tblTransaction.TransactionCode,          tblTransaction.TransactionCategory,          tblTransaction.InternationalOrDomestic,          tblTransaction.NumberOfSectors,          tblTransaction.TransactionStatus,          tblTransaction.TransactionStatusUserID,          tblTransactionCRSCheck.FareCorrect,          tblTransactionCRSCheck.TaxCorrect,          tblTransactionCRSCheck.CommissionCorrect,          tblTransactionCRSCheck.ContractRulesCorrect,          tblTransactionCRSCheck.ContractID from tblTransaction left join tblTransactionCRSCheck on     tblTransactionCRSCheck.AuditID = tblTransaction.AuditID and     tblTransactionCRSCheck.TransactionNumber = tblTransaction.TransactionNumber where tblTransaction.AuditID = 10001720 and     tblTransaction.ExcludedFromAudit = 'F' and     tblTransaction.SystemPricedFare = 'F' order by tblTransaction.FareBasis
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.sql.SQLException: Connection is closed
    GenerateAuditBatches.java sql 4 : select count(*) from tblTransaction where AuditID = 10001720 and     ExcludedFromAudit = 'F' and     SystemPricedFare = 'T'
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.lang.Exception: Invalid handle [null] Database error code:0
    GenerateAuditBatches.java sql 5 transactions : select tblTransaction.BatchID,          tblTransaction.TransactionNumber,          tblTransaction.PrimeDocumentNumber,          tblTransaction.AgentIATACode,          tblTransaction.NetRemitInd,          tblTransaction.ITBTFare,          tblTransaction.TourCode,          tblTransaction.FareBasis,          tblTransaction.TransactionCode,          tblTransaction.TransactionCategory,          tblTransaction.InternationalOrDomestic,          tblTransaction.NumberOfSectors,          tblTransaction.TransactionStatus,          tblTransaction.TransactionStatusUserID,          tblTransactionCRSCheck.FareCorrect,          tblTransactionCRSCheck.TaxCorrect,          tblTransactionCRSCheck.CommissionCorrect,          tblTransactionCRSCheck.ContractRulesCorrect,          tblTransactionCRSCheck.ContractID from tblTransaction left join tblTransactionCRSCheck on     tblTransactionCRSCheck.AuditID = tblTransaction.AuditID and     tblTransactionCRSCheck.TransactionNumber = tblTransaction.TransactionNumber where tblTransaction.AuditID = 10001720 and     tblTransaction.ExcludedFromAudit = 'F' and     tblTransaction.SystemPricedFare = 'T' order by tblTransaction.FareBasis
    java.lang.Exception: Invalid handle [null] Database error code:0
         at com.select.auditlink.GenerateAuditBatches.batchTransactions(GenerateAuditBatches.java:966)
         at com.select.auditlink.GenerateAuditBatches.batchAudit(GenerateAuditBatches.java:419)
         at com.select.auditlink.GenerateAuditBatches.run(GenerateAuditBatches.java:172)
    java.lang.Exception: Invalid handle [null] Database error code:0
         at com.select.auditlink.GenerateAuditBatches.batchTransactions(GenerateAuditBatches.java:966)
         at com.select.auditlink.GenerateAuditBatches.batchAudit(GenerateAuditBatches.java:424)
         at com.select.auditlink.GenerateAuditBatches.run(GenerateAuditBatches.java:172)
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.sql.SQLException: Connection is closed
    GenerateAuditBatches.java sql 4 : select count(*) from tblTransaction where AuditID = 10001720 and     ExcludedFromAudit = 'F' and     SystemPricedFare = 'T'
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.lang.Exception: Invalid handle [null] Database error code:0
    GenerateAuditBatches.java sql 5 transactions : select tblTransaction.BatchID,          tblTransaction.TransactionNumber,          tblTransaction.PrimeDocumentNumber,          tblTransaction.AgentIATACode,          tblTransaction.NetRemitInd,          tblTransaction.ITBTFare,          tblTransaction.TourCode,          tblTransaction.FareBasis,          tblTransaction.TransactionCode,          tblTransaction.TransactionCategory,          tblTransaction.InternationalOrDomestic,          tblTransaction.NumberOfSectors,          tblTransaction.TransactionStatus,          tblTransaction.TransactionStatusUserID,          tblTransactionCRSCheck.FareCorrect,          tblTransactionCRSCheck.TaxCorrect,          tblTransactionCRSCheck.CommissionCorrect,          tblTransactionCRSCheck.ContractRulesCorrect,          tblTransactionCRSCheck.ContractID from tblTransaction left join tblTransactionCRSCheck on     tblTransactionCRSCheck.AuditID = tblTransaction.AuditID and     tblTransactionCRSCheck.TransactionNumber = tblTransaction.TransactionNumber where tblTransaction.AuditID = 10001720 and     tblTransaction.ExcludedFromAudit = 'F' and     tblTransaction.SystemPricedFare = 'T' order by tblTransaction.FareBasis
    Exception :java.sql.SQLException: Invalid handle
    java.lang.Exception: Invalid handle [null] Database error code:0
    Exception :java.sql.SQLException: Connection is closed
    GenerateAuditBatches.java sql 4 : select count(*) from tblTransaction where AuditID = 10001720 and     ExcludedFromAudit = 'F' and     SystemPricedFare = 'T'
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.lang.Exception: Invalid handle [null] Database error code:0
         at com.select.auditlink.GenerateAuditBatches.batchTransactions(GenerateAuditBatches.java:966)
         at com.select.auditlink.GenerateAuditBatches.batchAudit(GenerateAuditBatches.java:429)
         at com.select.auditlink.GenerateAuditBatches.run(GenerateAuditBatches.java:172)
    java.lang.Exception: Invalid handle [null] Database error code:0
         at com.select.auditlink.GenerateAuditBatches.batchTransactions(GenerateAuditBatches.java:966)
         at com.select.auditlink.GenerateAuditBatches.batchAudit(GenerateAuditBatches.java:434)
         at com.select.auditlink.GenerateAuditBatches.run(GenerateAuditBatches.java:172)
    GenerateAuditBatches.java sql 5 transactions : select tblTransaction.BatchID,          tblTransaction.TransactionNumber,          tblTransaction.PrimeDocumentNumber,          tblTransaction.AgentIATACode,          tblTransaction.NetRemitInd,          tblTransaction.ITBTFare,          tblTransaction.TourCode,          tblTransaction.FareBasis,          tblTransaction.TransactionCode,          tblTransaction.TransactionCategory,          tblTransaction.InternationalOrDomestic,          tblTransaction.NumberOfSectors,          tblTransaction.TransactionStatus,          tblTransaction.TransactionStatusUserID,          tblTransactionCRSCheck.FareCorrect,          tblTransactionCRSCheck.TaxCorrect,          tblTransactionCRSCheck.CommissionCorrect,          tblTransactionCRSCheck.ContractRulesCorrect,          tblTransactionCRSCheck.ContractID from tblTransaction left join tblTransactionCRSCheck on     tblTransactionCRSCheck.AuditID = tblTransaction.AuditID and     tblTransactionCRSCheck.TransactionNumber = tblTransaction.TransactionNumber where tblTransaction.AuditID = 10001720 and     tblTransaction.ExcludedFromAudit = 'F' and     tblTransaction.SystemPricedFare = 'T' order by tblTransaction.FareBasis
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.sql.SQLException: Connection is closed
    GenerateAuditBatches.java sql 4 : select count(*) from tblTransaction where AuditID = 10001720 and     ExcludedFromAudit = 'F' and     SystemPricedFare = 'F'
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.lang.Exception: Invalid handle [null] Database error code:0
    GenerateAuditBatches.java sql 5 transactions : select tblTransaction.BatchID,          tblTransaction.TransactionNumber,          tblTransaction.PrimeDocumentNumber,          tblTransaction.AgentIATACode,          tblTransaction.NetRemitInd,          tblTransaction.ITBTFare,          tblTransaction.TourCode,          tblTransaction.FareBasis,          tblTransaction.TransactionCode,          tblTransaction.TransactionCategory,          tblTransaction.InternationalOrDomestic,          tblTransaction.NumberOfSectors,          tblTransaction.TransactionStatus,          tblTransaction.TransactionStatusUserID,          tblTransactionCRSCheck.FareCorrect,          tblTransactionCRSCheck.TaxCorrect,          tblTransactionCRSCheck.CommissionCorrect,          tblTransactionCRSCheck.ContractRulesCorrect,          tblTransactionCRSCheck.ContractID from tblTransaction left join tblTransactionCRSCheck on     tblTransactionCRSCheck.AuditID = tblTransaction.AuditID and     tblTransactionCRSCheck.TransactionNumber = tblTransaction.TransactionNumber where tblTransaction.AuditID = 10001720 and     tblTransaction.ExcludedFromAudit = 'F' and     tblTransaction.SystemPricedFare = 'F' order by tblTransaction.FareBasis
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.sql.SQLException: Connection is closedjava.lang.Exception: Invalid handle [null] Database error code:0
         at com.select.auditlink.GenerateAuditBatches.batchTransactions(GenerateAuditBatches.java:966)
         at com.select.auditlink.GenerateAuditBatches.batchAudit(GenerateAuditBatches.java:439)
         at com.select.auditlink.GenerateAuditBatches.run(GenerateAuditBatches.java:172)
    GenerateAuditBatches.java sql 4 : select count(*) from tblTransaction where AuditID = 10001720 and     ExcludedFromAudit = 'F' and     SystemPricedFare = 'F'
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.lang.Exception: Invalid handle [null] Database error code:0
    GenerateAuditBatches.java sql 5 transactions : select tblTransaction.BatchID,          tblTransaction.TransactionNumber,          tblTransaction.PrimeDocumentNumber,          tblTransaction.AgentIATACode,          tblTransaction.NetRemitInd,          tblTransaction.ITBTFare,          tblTransaction.TourCode,          tblTransaction.FareBasis,          tblTransaction.TransactionCode,          tblTransaction.TransactionCategory,          tblTransaction.InternationalOrDomestic,          tblTransaction.NumberOfSectors,          tblTransaction.TransactionStatus,          tblTransaction.TransactionStatusUserID,          tblTransactionCRSCheck.FareCorrect,          tblTransactionCRSCheck.TaxCorrect,          tblTransactionCRSCheck.CommissionCorrect,          tblTransactionCRSCheck.ContractRulesCorrect,          tblTransactionCRSCheck.ContractID from tblTransaction left join tblTransactionCRSCheck on     tblTransactionCRSCheck.AuditID = tblTransaction.AuditID and     tblTransactionCRSCheck.TransactionNumber = tblTransaction.TransactionNumber where tblTransaction.AuditID = 10001720 and     tblTransaction.ExcludedFromAudit = 'F' and     tblTransaction.SystemPricedFare = 'F' order by tblTransaction.FareBasis
    Exception :java.sql.SQLException: Invalid handle
    java.lang.Exception: Invalid handle [null] Database error code:0
         at com.select.auditlink.GenerateAuditBatches.batchTransactions(GenerateAuditBatches.java:966)
         at com.select.auditlink.GenerateAuditBatches.batchAudit(GenerateAuditBatches.java:444)
         at com.select.auditlink.GenerateAuditBatches.run(GenerateAuditBatches.java:172)
    Exception :java.sql.SQLException: Connection is closed
    GenerateAuditBatches.java sql 4 : select count(*) from tblTransaction where AuditID = 10001720 and     ExcludedFromAudit = 'F' and     SystemPricedFare = 'F'
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.lang.Exception: Invalid handle [null] Database error code:0
    GenerateAuditBatches.java sql 5 transactions : select tblTransaction.BatchID,          tblTransaction.TransactionNumber,          tblTransaction.PrimeDocumentNumber,          tblTransaction.AgentIATACode,          tblTransaction.NetRemitInd,          tblTransaction.ITBTFare,          tblTransaction.TourCode,          tblTransaction.FareBasis,          tblTransaction.TransactionCode,          tblTransaction.TransactionCategory,          tblTransaction.InternationalOrDomestic,          tblTransaction.NumberOfSectors,          tblTransaction.TransactionStatus,          tblTransaction.TransactionStatusUserID,          tblTransactionCRSCheck.FareCorrect,          tblTransactionCRSCheck.TaxCorrect,          tblTransactionCRSCheck.CommissionCorrect,          tblTransactionCRSCheck.ContractRulesCorrect,          tblTransactionCRSCheck.ContractID from tblTransaction left join tblTransactionCRSCheck on     tblTransactionCRSCheck.AuditID = tblTransaction.AuditID and     tblTransactionCRSCheck.TransactionNumber = tblTransaction.TransactionNumber where tblTransaction.AuditID = 10001720 and     tblTransaction.ExcludedFromAudit = 'F' and     tblTransaction.SystemPricedFare = 'F' order by tblTransaction.FareBasis
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.sql.SQLException: Connection is closed
    GenerateAuditBatches.java sql 4 : select count(*) from tblTransaction where AuditID = 10001720 and     ExcludedFromAudit = 'F' and     SystemPricedFare = 'T'
    java.lang.Exception: Invalid handle [null] Database error code:0
         at com.select.auditlink.GenerateAuditBatches.batchTransactions(GenerateAuditBatches.java:966)
         at com.select.auditlink.GenerateAuditBatches.batchAudit(GenerateAuditBatches.java:449)
         at com.select.auditlink.GenerateAuditBatches.run(GenerateAuditBatches.java:172)
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.lang.Exception: Invalid handle [null] Database error code:0
    GenerateAuditBatches.java sql 5 transactions : select tblTransaction.BatchID,          tblTransaction.TransactionNumber,          tblTransaction.PrimeDocumentNumber,          tblTransaction.AgentIATACode,          tblTransaction.NetRemitInd,          tblTransaction.ITBTFare,          tblTransaction.TourCode,          tblTransaction.FareBasis,          tblTransaction.TransactionCode,          tblTransaction.TransactionCategory,          tblTransaction.InternationalOrDomestic,          tblTransaction.NumberOfSectors,          tblTransaction.TransactionStatus,          tblTransaction.TransactionStatusUserID,          tblTransactionCRSCheck.FareCorrect,          tblTransactionCRSCheck.TaxCorrect,          tblTransactionCRSCheck.CommissionCorrect,          tblTransactionCRSCheck.ContractRulesCorrect,          tblTransactionCRSCheck.ContractID from tblTransaction left join tblTransactionCRSCheck on     tblTransactionCRSCheck.AuditID = tblTransaction.AuditID and     tblTransactionCRSCheck.TransactionNumber = tblTransaction.TransactionNumber where tblTransaction.AuditID = 10001720 and     tblTransaction.ExcludedFromAudit = 'F' and     tblTransaction.SystemPricedFare = 'T' order by tblTransaction.FareBasis
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.sql.SQLException: Connection is closed
    GenerateAuditBatches.java sql 4 : select count(*) from tblTransaction where AuditID = 10001720 and     ExcludedFromAudit = 'F' and     SystemPricedFare = 'T'
    java.lang.Exception: Invalid handle [null] Database error code:0
         at com.select.auditlink.GenerateAuditBatches.batchTransactions(GenerateAuditBatches.java:966)
         at com.select.auditlink.GenerateAuditBatches.batchAudit(GenerateAuditBatches.java:454)
         at com.select.auditlink.GenerateAuditBatches.run(GenerateAuditBatches.java:172)
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.lang.Exception: Invalid handle [null] Database error code:0
    GenerateAuditBatches.java sql 5 transactions : select tblTransaction.BatchID,          tblTransaction.TransactionNumber,          tblTransaction.PrimeDocumentNumber,          tblTransaction.AgentIATACode,          tblTransaction.NetRemitInd,          tblTransaction.ITBTFare,          tblTransaction.TourCode,          tblTransaction.FareBasis,          tblTransaction.TransactionCode,          tblTransaction.TransactionCategory,          tblTransaction.InternationalOrDomestic,          tblTransaction.NumberOfSectors,          tblTransaction.TransactionStatus,          tblTransaction.TransactionStatusUserID,          tblTransactionCRSCheck.FareCorrect,          tblTransactionCRSCheck.TaxCorrect,          tblTransactionCRSCheck.CommissionCorrect,          tblTransactionCRSCheck.ContractRulesCorrect,          tblTransactionCRSCheck.ContractID from tblTransaction left join tblTransactionCRSCheck on     tblTransactionCRSCheck.AuditID = tblTransaction.AuditID and     tblTransactionCRSCheck.TransactionNumber = tblTransaction.TransactionNumber where tblTransaction.AuditID = 10001720 and     tblTransaction.ExcludedFromAudit = 'F' and     tblTransaction.SystemPricedFare = 'T' order by tblTransaction.FareBasis
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.sql.SQLException: Connection is closed
    GenerateAuditBatches.java sql 4 : select count(*) from tblTransaction where AuditID = 10001720 and     ExcludedFromAudit = 'F' and     SystemPricedFare = 'T'
    java.lang.Exception: Invalid handle [null] Database error code:0
         at com.select.auditlink.GenerateAuditBatches.batchTransactions(GenerateAuditBatches.java:966)
         at com.select.auditlink.GenerateAuditBatches.batchAudit(GenerateAuditBatches.java:459)
         at com.select.auditlink.GenerateAuditBatches.run(GenerateAuditBatches.java:172)
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.lang.Exception: Invalid handle [null] Database error code:0
    GenerateAuditBatches.java sql 5 transactions : select tblTransaction.BatchID,          tblTransaction.TransactionNumber,          tblTransaction.PrimeDocumentNumber,          tblTransaction.AgentIATACode,          tblTransaction.NetRemitInd,          tblTransaction.ITBTFare,          tblTransaction.TourCode,          tblTransaction.FareBasis,          tblTransaction.TransactionCode,          tblTransaction.TransactionCategory,          tblTransaction.InternationalOrDomestic,          tblTransaction.NumberOfSectors,          tblTransaction.TransactionStatus,          tblTransaction.TransactionStatusUserID,          tblTransactionCRSCheck.FareCorrect,          tblTransactionCRSCheck.TaxCorrect,          tblTransactionCRSCheck.CommissionCorrect,          tblTransactionCRSCheck.ContractRulesCorrect,          tblTransactionCRSCheck.ContractID from tblTransaction left join tblTransactionCRSCheck on     tblTransactionCRSCheck.AuditID = tblTransaction.AuditID and     tblTransactionCRSCheck.TransactionNumber = tblTransaction.TransactionNumber where tblTransaction.AuditID = 10001720 and     tblTransaction.ExcludedFromAudit = 'F' and     tblTransaction.SystemPricedFare = 'T' order by tblTransaction.FareBasis
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.sql.SQLException: Connection is closed
    GenerateAuditBatches.java sql 4 : select count(*) from tblTransaction where AuditID = 10001720 and     ExcludedFromAudit = 'F' and     SystemPricedFare = 'F'
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.lang.Exception: Invalid handle [null] Database error code:0
    java.lang.Exception: Invalid handle [null] Database error code:0
         at com.select.auditlink.GenerateAuditBatches.batchTransactions(GenerateAuditBatches.java:966)
         at com.select.auditlink.GenerateAuditBatches.batchAudit(GenerateAuditBatches.java:464)
         at com.select.auditlink.GenerateAuditBatches.run(GenerateAuditBatches.java:172)
    java.lang.Exception: Invalid handle [null] Database error code:0
         at com.select.auditlink.GenerateAuditBatches.batchTransactions(GenerateAuditBatches.java:966)
         at com.select.auditlink.GenerateAuditBatches.batchAudit(GenerateAuditBatches.java:469)
         at com.select.auditlink.GenerateAuditBatches.run(GenerateAuditBatches.java:172)
    GenerateAuditBatches.java sql 5 transactions : select tblTransaction.BatchID,          tblTransaction.TransactionNumber,          tblTransaction.PrimeDocumentNumber,          tblTransaction.AgentIATACode,          tblTransaction.NetRemitInd,          tblTransaction.ITBTFare,          tblTransaction.TourCode,          tblTransaction.FareBasis,          tblTransaction.TransactionCode,          tblTransaction.TransactionCategory,          tblTransaction.InternationalOrDomestic,          tblTransaction.NumberOfSectors,          tblTransaction.TransactionStatus,          tblTransaction.TransactionStatusUserID,          tblTransactionCRSCheck.FareCorrect,          tblTransactionCRSCheck.TaxCorrect,          tblTransactionCRSCheck.CommissionCorrect,          tblTransactionCRSCheck.ContractRulesCorrect,          tblTransactionCRSCheck.ContractID from tblTransaction left join tblTransactionCRSCheck on     tblTransactionCRSCheck.AuditID = tblTransaction.AuditID and     tblTransactionCRSCheck.TransactionNumber = tblTransaction.TransactionNumber where tblTransaction.AuditID = 10001720 and     tblTransaction.ExcludedFromAudit = 'F' and     tblTransaction.SystemPricedFare = 'F' order by tblTransaction.FareBasis
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.sql.SQLException: Connection is closed
    GenerateAuditBatches.java sql 4 : select count(*) from tblTransaction where AuditID = 10001720 and     ExcludedFromAudit = 'F' and     SystemPricedFare = 'F'
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.lang.Exception: Invalid handle [null] Database error code:0
    GenerateAuditBatches.java sql 5 transactions : select tblTransaction.BatchID,          tblTransaction.TransactionNumber,          tblTransaction.PrimeDocumentNumber,          tblTransaction.AgentIATACode,          tblTransaction.NetRemitInd,          tblTransaction.ITBTFare,          tblTransaction.TourCode,          tblTransaction.FareBasis,          tblTransaction.TransactionCode,          tblTransaction.TransactionCategory,          tblTransaction.InternationalOrDomestic,          tblTransaction.NumberOfSectors,          tblTransaction.TransactionStatus,          tblTransaction.TransactionStatusUserID,          tblTransactionCRSCheck.FareCorrect,          tblTransactionCRSCheck.TaxCorrect,          tblTransactionCRSCheck.CommissionCorrect,          tblTransactionCRSCheck.ContractRulesCorrect,          tblTransactionCRSCheck.ContractID from tblTransaction left join tblTransactionCRSCheck on     tblTransactionCRSCheck.AuditID = tblTransaction.AuditID and     tblTransactionCRSCheck.TransactionNumber = tblTransaction.TransactionNumber where tblTransaction.AuditID = 10001720 and     tblTransaction.ExcludedFromAudit = 'F' and     tblTransaction.SystemPricedFare = 'F' order by tblTransaction.FareBasis
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.sql.SQLException: Connection is closed
    GenerateAuditBatches.java sql 4 : select count(*) from tblTransaction where AuditID = 10001720 and     ExcludedFromAudit = 'F' and     SystemPricedFare = 'F'
    java.lang.Exception: Invalid handle [null] Database error code:0
         at com.select.auditlink.GenerateAuditBatches.batchTransactions(GenerateAuditBatches.java:966)
         at com.select.auditlink.GenerateAuditBatches.batchAudit(GenerateAuditBatches.java:474)
         at com.select.auditlink.GenerateAuditBatches.run(GenerateAuditBatches.java:172)
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.lang.Exception: Invalid handle [null] Database error code:0
    GenerateAuditBatches.java sql 5 transactions : select tblTransaction.BatchID,          tblTransaction.TransactionNumber,          tblTransaction.PrimeDocumentNumber,          tblTransaction.AgentIATACode,          tblTransaction.NetRemitInd,          tblTransaction.ITBTFare,          tblTransaction.TourCode,          tblTransaction.FareBasis,          tblTransaction.TransactionCode,          tblTransaction.TransactionCategory,          tblTransaction.InternationalOrDomestic,          tblTransaction.NumberOfSectors,          tblTransaction.TransactionStatus,          tblTransaction.TransactionStatusUserID,          tblTransactionCRSCheck.FareCorrect,          tblTransactionCRSCheck.TaxCorrect,          tblTransactionCRSCheck.CommissionCorrect,          tblTransactionCRSCheck.ContractRulesCorrect,          tblTransactionCRSCheck.ContractID from tblTransaction left join tblTransactionCRSCheck on     tblTransactionCRSCheck.AuditID = tblTransaction.AuditID and     tblTransactionCRSCheck.TransactionNumber = tblTransaction.TransactionNumber where tblTransaction.AuditID = 10001720 and     tblTransaction.ExcludedFromAudit = 'F' and     tblTransaction.SystemPricedFare = 'F' order by tblTransaction.FareBasis
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.sql.SQLException: Connection is closed
    GenerateAuditBatches.java sql 1 : update tblAudit set     NumberOfBatches = 1078 where AuditID = 10001720
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.sql.SQLException: Connection is closed
    GenerateAuditBatches.java sql 12 query2 : select BatchID from     tblAuditBatch where AuditID = 10001720
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.lang.Exception: Invalid handle [null] Database error code:0
    java.lang.Exception: Invalid handle [null] Database error code:0
         at com.select.auditlink.GenerateAuditBatches.updateAuditBatches(GenerateAuditBatches.java:1427)
         at com.select.auditlink.GenerateAuditBatches.run(GenerateAuditBatches.java:217)
    GenerateAuditBatches.java sql 2 : update tblAudit set     NumberOfAuditedBatches = (     select     count(*)     from     tblAuditBatch     where     AuditID = 10001720     and          NumberOfAuditedTransactions = NumberOfTransactions) where     AuditID = 10001720
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.sql.SQLException: Connection is closed
    GenerateAuditBatches.java sql 3 : update tblAudit set     NumberOfAuditedTransactions = (     select     count(*)     from     tblTransaction     where     AuditID = 10001720     and          Audited = 'T') where     AuditID = 10001720
    Exception :java.sql.SQLException: Invalid handle
    Exception :java.sql.SQLException: Connection is closed
    Exception :java.sql.SQLException: Connection is closed
    Please give me suitable solution of this issue.
    Thanks
    Rajnish
    Message was edited by:
    rajnishsunjava

    java.sql.SQLException: [Microsoft][ODBC Visual FoxPro Driver]File must be opened exclusively.
    In the Visual Foxpro table, I saw no READ ONLY settings.And also, there are
    no delete permission grants and there is no user database sesssion concept.
    The ODBC DSN for MYTABLE is setup as:
    - Free Tables (not database)
    - Null (checked)
    - Deleted (checked)If you're using Visual Foxpro database(.DBC), you should see "Exclusive" option too. You can try check it, but I don't know whether your issue will disappear.

  • Java.sql.SQLException: [Microsoft][ODBC Visual FoxPro Driver]Syntax error

    Hi all,
    I am able to INSERT and SELECT records from FoxPRo database successfully.
    The driver is Sun JDBC-ODBC bridge
    The DELETE statement throws no exception.
    I've tried to execute PACK after the DELETE call and got following exception:
    java.sql.SQLException: [Microsoft][ODBC Visual FoxPro Driver]File must be opened exclusively.So I tried USE MYTABLE EXCLUSIVE in a Statement before calling PACK and got the exception:
    java.sql.SQLException: [Microsoft][ODBC Visual FoxPro Driver]Syntax error or access violationI've also tried inserting the USE MYTABLE EXCLUSIVE before calling DELETE but got the same exception above.
    The ODBC DSN for MYTABLE is setup as:
    - Free Tables (not database)
    - Null (checked)
    - Deleted (checked)
    - Fetch data in background (checked)
    I am not able to issue any of the following commands to FoxPro using java
    OPEN - To open a table
    CLOSE - To close a table
    USE - To open a table for uer either in exclusive mode or shared mode
    The exception being generated is :
    java.sql.SQLException: [Microsoft][ODBC Visual FoxPro Driver]Syntax error or access violationThe help file of the Microsoft Visual Foxpro Driver states that the driver has support for the above commands.I a not able to get the way to issue the above commands to the driver using java.
    In setting up the ODBC DSN I saw no "read only" setting.
    In the Visual Foxpro table, I saw no READ ONLY settings.And also, there are no delete permission grants and there is no user database sesssion concept.
    I've tried all of the above with DSN mapped to a database(NOT free tables) and setting AUTO-COMMIT OFF and AUTO-COMMIT ON.But in vain. The same exceptions as those stated above persisted.
    Environment:
    Microsoft Windows XP Professional
    JDK version "1.4.2_09"
    Microsoft Visual Foxpro 06.00.8167
    Microsoft Visual Foxpro Driver 6.01.8629.01
    Don't know what else to try.
    Can anybody please help me.
    Thanks in advance
    Archana

    java.sql.SQLException: [Microsoft][ODBC Visual FoxPro Driver]File must be opened exclusively.
    In the Visual Foxpro table, I saw no READ ONLY settings.And also, there are
    no delete permission grants and there is no user database sesssion concept.
    The ODBC DSN for MYTABLE is setup as:
    - Free Tables (not database)
    - Null (checked)
    - Deleted (checked)If you're using Visual Foxpro database(.DBC), you should see "Exclusive" option too. You can try check it, but I don't know whether your issue will disappear.

  • Java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]

    I'm stuck for 2 days.
    Can anyone advise where I can find online/download what this error means when I run a jsp page to connect to SQL server?
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index

    Hi!
    I have found this post in another forum:
    David,
    I had a similar problem today, using the JDBC-ODBC driver to connect to
    Microsoft SQL Server 7. Apparently the order in which you retrieve columns
    can make a difference. I got this information from the following URL:
    http://enhydra.enhydra.org/project/mailingLists/enhydra/199911/msg00110.htm
    l
    I tried it in my application and it worked. Changing:
    result.setTitle(rs.getString("title"));
    result.setProducer(rs.getString("producer"));
    to:
    result.setProducer(rs.getString("producer"));
    result.setTitle(rs.getString("title"));
    made the exception disapear and now my code works fine. I still dont know
    exactly where the problem comes from.
    Hope this helps.
    Regards,
    Geri

  • Error:java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Connection

    Hi,
    while running jsp page i m getting error as follows:
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver]Connection is busy with results for another hstmt..
    what is this error...
    what should i do to solve this problem...
    plz let me know what is this error & how to solve this...
    Thanx in advance....

    Why don't you do a search in google with the excpetion?
    If you cannot then try this link
    [http://www.idssoftware.com/faq-e.html]

  • Java.sql.SQLException: [TimesTen][TimesTen 6.0.1 ODBC Driver][TimesTen]TT08

    Hi,
    I have installed TimesTen 6.0.1 and created Server/Client DSN's and trying to connect from a simple Java File using Client DSN, but encounter the following error. What could be the reason
    java.sql.SQLException: [TimesTen][TimesTen 6.0.1 ODBC Driver][TimesTen]TT0830: Cannot create data store file. OS-detected error: The system c
    annot find the path specified. -- file "db.c", lineno 7188, procedure "sbDbCreate()"
    at com.timesten.jdbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6268)
    at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:6391)
    at com.timesten.jdbc.JdbcOdbc.standardError(JdbcOdbc.java:6356)
    at com.timesten.jdbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3822)
    at com.timesten.jdbc.JdbcOdbcConnection.connect(JdbcOdbcConnection.java:1714)
    at com.timesten.jdbc.TimesTenDriver.connect(TimesTenDriver.java:362)
    at com.timesten.jdbc.TimesTenDriver.connect(TimesTenDriver.java:218)
    at java.sql.DriverManager.getConnection(DriverManager.java:512)
    at java.sql.DriverManager.getConnection(DriverManager.java:193)
    at Example.main(Example.java:20)
    Thanks in Adv
    Venkata

    It looks like you encountered a permission problem. Can you share the details of what operation you were trying to do, your connection and DSN settings and configuration file?
    - scheung

  • JDBC:ODBC, Resultset with 0 rows throws SqlException

    For short, I have used forte for java version 3.0 ea to create an application which is manipulating data in an MS SQLServer database. Further I have installed JDK 1.3.1 and JRE 1.3.1, running on WINDOWS 2000 os.
    The DB-configuring is set to binary sort order.
    When my program is running a "rs = stmt.executQuery() then the situation is:
    1) If this query results in 1 or more rows in the resultset, everything seems to work fine.
    2) But if the resultset doesn't contains any rows, which is a quit legal result and actually a succes criteria in a certain point in my prg., an SQLException is thrown stating "Invalid object name + 'database tablename in uppercase'". Although the db-tables name is in mixedletters (see the code below).
    For testing purpose I have worked out a quit simpel prg. which reflects the real prg. I enclose it for examining purpose.
    I certaintly hope somebody is able to guide me to a solution.
    Thanks in advance.
    Kind regards
    Kuno Reck
    IBC Systems A/S
    TestCode:
    import java.sql.*;
    import javax.swing.*;
    //import javax.swing.table.*;
    class DBTest {
    private static final String driver = "sun.jdbc.odbc.JdbcOdbcDriver",
    dbUrl = "jdbc:odbc:KEKVRF",
    comUser = "tbs", password = "tbs";
    private static Connection conn;
    private static Statement stmt;
    private static ResultSet rs;
    // String queryDdi = "SELECT DISTINCT N.DdiNumber FROM DdiNumbers N left
    join DdiGroups G on N.DdiNumber = G.DdiNumber and N.ProviderId = G.ProviderId
    WHERE 1 = 1 AND N.DdiNumber BETWEEN 35248305 AND 35248309 ORDER BY N.DdiNumber";
    // String queryDdi = "SELECT DISTINCT N.DdiNumber FROM DdiNumbers N left
    join DdiGroups G on N.DdiNumber = G.DdiNumber and N.ProviderId = G.ProviderId
    WHERE 1 = 1 AND N.DdiNumber = 35248307 ORDER BY N.DdiNumber";
    String queryDdi = "SELECT DdiNumber FROM DdiNumbers WHERE DdiNumber =
    35548307";
    public static void main (String[] args){
    DBTest dbtest = new DBTest();
    public DBTest() {
    try{
    Class.forName(driver);
    conn = DriverManager.getConnection(dbUrl, comUser, password);
    java.sql.DriverManager.setLogStream(java.lang.System.out);
    stmt = conn.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
    ResultSet.CONCUR_READ_ONLY);
    rs = stmt.executeQuery(queryDdi);
    if (rs.isBeforeFirst()){
    while (rs.next()) {
    // BEM?RK! KolonneV?rdierne skal l?ses ud i samme r?kkef?lge som de
    selectes i sql-statementet.
    System.out.println("DdiNumber = "+rs.getString("DdiNumber"));
    else{
    JOptionPane.showMessageDialog(null, "> Ddi-number does not exist
    < ", "Validation of input fields", JOptionPane.ERROR_MESSAGE);
    catch (SQLException e){
    JOptionPane.showMessageDialog(null, "No matching records found, " +
    e.getMessage(), "SQLException", JOptionPane.ERROR_MESSAGE);
    System.exit(0);
    catch (ClassNotFoundException cnfe){
    JOptionPane.showMessageDialog(null, "ClassNotFoundException, " +
    cnfe.getMessage(), "ClassNotFoundException", JOptionPane.ERROR_MESSAGE);
    LogStream:
    C:\jdk1.3.1\bin>java DBTest
    *Connection.createStatement
    Allocating Statement Handle (SQLAllocStmt), hDbc=148181752
    hStmt=148185176
    Setting statement option (SQLSetStmtOption), hStmt=148185176, fOption=6,
    vParam=3
    Setting statement option (SQLSetStmtOption), hStmt=148185176, fOption=7,
    vParam=1
    Registering Statement sun.jdbc.odbc.JdbcOdbcStatement@17d257
    *Statement.executeQuery (SELECT DdiNumber FROM DdiNumbers WHERE DdiNumber =
    3554830
    7)
    *Statement.execute (SELECT DdiNumber FROM DdiNumbers WHERE DdiNumber = 35548307)
    Free statement (SQLFreeStmt), hStmt=148185176, fOption=0
    Executing (SQLExecDirect), hStmt=148185176, szSqlStr=SELECT DdiNumber FROM
    DdiNumbe
    rs WHERE DdiNumber = 35548307
    Number of result columns (SQLNumResultCols), hStmt=148185176
    value=1
    Get statement option (SQLGetStmtOption), hStmt=148185176, fOption=6
    value=3
    SQLWarning: reason(Result set type has been changed.)
    Number of result columns (SQLNumResultCols), hStmt=148185176
    value=1
    Number of affected rows (SQLRowCount), hStmt=148185176
    value=0
    Fetching (SQLFetchScroll), hStmt=148185176
    End of result set (SQL_NO_DATA)
    Get statement option (SQLGetStmtOption), hStmt=148185176, fOption=14
    RETCODE = -1
    ERROR - Generating SQLException...
    SQLException: SQLState(24000) vendor code(0)
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Invalid cursor state
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6031)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6188)
    at sun.jdbc.odbc.JdbcOdbc.SQLGetStmtOption(JdbcOdbc.java:3773)
    at sun.jdbc.odbc.JdbcOdbcResultSet.calculateRowCount
    (JdbcOdbcResultSet.java
    :5982)
    at sun.jdbc.odbc.JdbcOdbcResultSet.initialize
    (JdbcOdbcResultSet.java:150)
    at sun.jdbc.odbc.JdbcOdbcStatement.getResultSet
    (JdbcOdbcStatement.java:420)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery
    (JdbcOdbcStatement.java:250)
    at DBTest.<init>(DBTest.java:27)
    at DBTest.main(DBTest.java:18)
    Fetching (SQLFetchScroll), hStmt=148185176
    End of result set (SQL_NO_DATA)
    *Connection.createStatement
    Allocating Statement Handle (SQLAllocStmt), hDbc=148181752
    hStmt=148186208
    Setting statement option (SQLSetStmtOption), hStmt=148186208, fOption=6,
    vParam=0
    Setting statement option (SQLSetStmtOption), hStmt=148186208, fOption=7,
    vParam=1
    Registering Statement sun.jdbc.odbc.JdbcOdbcStatement@19c082
    *Statement.executeQuery (SELECT COUNT(*) FROM DDINUMBERS WHERE DDINUMBER =
    3554830
    7)
    *Statement.execute (SELECT COUNT(*) FROM DDINUMBERS WHERE DDINUMBER = 35548307)
    Free statement (SQLFreeStmt), hStmt=148186208, fOption=0
    Executing (SQLExecDirect), hStmt=148186208, szSqlStr=SELECT COUNT(*) FROM
    DDINUMBE
    RS WHERE DDINUMBER = 35548307
    RETCODE = -1
    ERROR - Generating SQLException...
    SQLException: SQLState(S0002) vendor code(208)
    java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid
    objec
    t name 'DDINUMBERS'.
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6031)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6188)
    at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(JdbcOdbc.java:2494)
    at sun.jdbc.odbc.JdbcOdbcStatement.execute(JdbcOdbcStatement.java:334)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery
    (JdbcOdbcStatement.java:249)
    at sun.jdbc.odbc.JdbcOdbcResultSet.calculateRowCount
    (JdbcOdbcResultSet.java
    :6063)
    at sun.jdbc.odbc.JdbcOdbcResultSet.initialize
    (JdbcOdbcResultSet.java:150)
    at sun.jdbc.odbc.JdbcOdbcStatement.getResultSet
    (JdbcOdbcStatement.java:420)
    at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery
    (JdbcOdbcStatement.java:250)
    at DBTest.<init>(DBTest.java:27)
    at DBTest.main(DBTest.java:18)
    ResultSet.finalize sun.jdbc.odbc.JdbcOdbcResultSet@4ac268
    ResultSet.finalize sun.jdbc.odbc.JdbcOdbcResultSet@216869
    *ResultSet.close
    C:\jdk1.3.1\bin>

    Hi,
    my suggestion: you can't use isBeforeFirst() on empty result set. Try following:
    rs = stmt.executeQuery(queryDdi);
    int count = 0;
    while (rs.next()) {
      count++;
      System.out.println("DdiNumber = "+rs.getString("DdiNumber"));
    if (count == 0) {
    JOptionPane.showMessageDialog(null, "> Ddi-number does not exist < ", "Validation of input fields", JOptionPane.ERROR_MESSAGE);
    }Best Regards,
    Martin

  • Exception java.sql.SQLException: [Microsoft][ODBC Microsoft Access 97 Drive

    Hi,
    I am writing a simple program wihich will display the list of table for a given database. Currently I am using JDBC-ODBC bridge for accessing MS Acccess data base. When I call getTables method of DatabaseMetaData. Following Exception was thrown. Any clue what could be the reason for this?
    Exception java.sql.SQLException: [Microsoft][ODBC Microsoft Access 97 Driver]Driver not capable
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access 97 Driver]Driver not capable
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6106)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:6263)
    at sun.jdbc.odbc.JdbcOdbc.SQLTables(JdbcOdbc.java:4917)
    at sun.jdbc.odbc.JdbcOdbcDatabaseMetaData.getTables(JdbcOdbcDatabaseMetaData.java:2395)
    at test.databaseMetaData.main(databaseMetaData.java:36)
    This exception occured in the following block:
         String[] strTables = {"TABLES"};
    rs = dbmd.getTables( null, "DBIS", "A%", strTables);
    Thanks in advance
    Cheers,
    Krishna

    Hi Krishna,
    First, do you have a correct ODBC setup on the platform your working on -- data source, etc.
    Second, please enclose the Java code for your connection, etc..
    Good luck!
    Francis

  • EXCEL ERROR(3010 : 07001 : java.sql.SQLException: [Microsoft][ODBC Excel Dr

    3010 : 07001 : java.sql.SQLException: [Microsoft][ODBC Excel Driver] Too few parameters. Expected 4.
    java.sql.SQLException: [Microsoft][ODBC Excel Driver] Too few parameters. Expected 4.
         at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbc.SQLExecute(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbcPreparedStatement.execute(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbcPreparedStatement.executeQuery(Unknown Source)
         at com.sunopsis.sql.SnpsQuery.executeQuery(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execCollOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.h.y(h.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    ANY solutions?

    thanks to the friends in another forum..i could identify the reason..
    http://www.thatsjava.com/jdbc/77269/
    regards
    B

  • URGENT :: java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]

    i am trying to execute the following query using jdbc
    String state = "select * from cs_test where Start_Time < DateAdd(\"s\",-19800,now()) AND End_Time >
    DateAdd(\"s\",-19800,now())";
    /java.sql.PreparedStatement querycs_test = c.prepareStatement(state);
    java.sql.Statement querycs_test= c.createStatement();
    java.sql.ResultSet rs = querycs_test.executeQuery(state);
    when i run the same query at the prompt in MS Access it works fine.
    The same line replaced with a simpler query works fine.
    but when i run the above i get an error
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.

    Here's the value of your query before preparing it:
    select * from cs_test where Start_Time < DateAdd("s",-19800,now()) AND End_Time > DateAdd("s",-19800,now())My SQL refererence doesn't have anything about functions called DateAdd or now. It might be Microsoft specific, in which case when your organization converts to another database your query is going to stop working. Don't use vender specific extensions.
    Was your intention to call a Java method called DateAdd or now? Then your problem is a few missing quotes. Otherwise, I'm sorry I can't be of more help.

  • App failed due to java.sql.SQLException: [Microsoft][ODBC driver for Oracl

    Hello I developed a small applicaion for insert data into database.but i am getting exception in the server like this.
    app failed due to java.sql.SQLException: [Microsoft][ODBC driver for Oracle][Oracle]ORA-01401: inserted value too large for column
    And the code is given below..
    import java.io.*;
    import java.sql.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class Jdbc1 extends HttpServlet
    public void service(HttpServletRequest request,HttpServletResponse response)throws ServletException,IOException
    PrintWriter out=response.getWriter();
    String no=request.getParameter("no");
    String name=request.getParameter("name");
    String age=request.getParameter("age");
    try
    System.out.println("1");
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    System.out.println("2");
    Connection con=DriverManager.getConnection("jdbc:odbc:rakesh","scott","tiger");
    System.out.println("3");
    Statement st=con.createStatement();
    System.out.println("4");
    st.executeUpdate("INSERT INTO ind VALUES('+no+','+name+','+age+')" );
    con.commit();
    con.close();
    catch(Exception e)
    System.out.println(" app failed due to "+e);
    }Please give solution for this....

    Hello sir..
    thanks for ur reply...
    for oracle 10g -----> we use XE as datasourse
    name..What?
    now i am using oracle 8i...Not so from the code you posted. Didn't I see "jdbc:odbc:..." in your first post?
    so what should i
    write...in the datasourse name...that means.......
    Connection
    con=DriverManager.getConnection("jdbc:oracle:thin:@loc
    alhost:1521:????????","scott","tiger");Do you really use the default username and password?
    What should i write in place of ?????????..The name of the database you wish to connect to, of course.
    Do you have your tnsnames.ora set up properly? Did you install this database?
    None of this has ANYTHING to do with the error you posted, of course. Fix that first and then worry about the thin driver. At least it appears that the code you posted managed to connect to the database.
    %

  • Java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]

    Hello. I'm trying to do an INSERT into an MS Access 2002 database, and this is throwing:
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] '' is not a valid name. Make sure that it does not include invalid characters or punctuation and that it is not too long.
    The INSERT is pretty straight forward:
    INSERT INTO Nodes (ID, Name, IP, DateAdded) values ("m22", "Colt,Frankfurt,GR", "213.61.48.52", "2003-02-06")
    ID is a TEXT field of length 3 and it is the key (table is currently empty)
    Name is a TEXT field of length 50.
    IP is a TEXT field of length 16.
    DateAdded is TEXT field of length 10.
    I tried putting dummy data into the table and doing a SELECT, and that worked without a problem.
    Can anyone tell me what is or might be causing this? Thanks in advance!!!
    - john ferguson, kansas city

    Okay, I fixed this.
    The fix was to change the double quotes (") to single quotes (') inside the VALUES part of the statement.
    So it went from:
    INSERT INTO Nodes (ID, Name, IP, DateAdded) values ("m22", "Colt,Frankfurt,GR", "213.61.48.52", "2003-02-06")
    to:
    INSERT INTO Nodes (ID, Name, IP, DateAdded) values ('m22', 'Colt,Frankfurt,GR', '213.61.48.52', '2003-02-06')
    and now it works fine.

  • Java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Optional fe

    Hello together!
    I am trying to add a long value to an access db.
    (I have a PreparedStatement.)
    But I get the following error:
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver]Optional feature not implemented
         at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbc.SQLBindInParameterBigint(Unknown Source)
         at sun.jdbc.odbc.JdbcOdbcPreparedStatement.setLong(Unknown Source)
         at Import.writeLineToDb(Import.java:70)
         at Import.main(Import.java:40)
    when exucuting the followint line:
    statement.setLong(2,new Long(data[1]).longValue());
    How can I find out which feature is missing and install it?
    Thanks.
    Markus

    Could it be that the driver is not installed for that?
    I am connecting like that:
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    connection = DriverManager.getConnection("jdbc:odbc:DRIVER={Microsoft Access Driver (*.mdb)};DBQ="+path, "", "");
    Thanks for your help.

  • Java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few...

    Can someone please help me? I get the error java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
    The offending section of code is:
    int resultsTableID = 0;
    query = "SELECT results_table_01 FROM dbo_results_table_01 WHERE image_1_id = '" + file1ID + "' AND image_2_id = '" + file2ID + "'";
    System.out.println(query);
    rs = s.executeQuery(query);
    The select statement comes out:
    SELECT results_table_01 FROM dbo_results_table_01 WHERE image_1_id = '115' AND image_2_id = '116'
    There does not seem to be a problem with the parameter separations, so if anyone can spot what I have done wrong I would appreciate it.
    Thanks

    I have just tried what you advised: Not using single quotes, and I got the same error.
    The query now looks like:
    query = "SELECT results_table_01 FROM dbo_results_table_01 WHERE image_1_id = " + file1ID + " AND image_2_id = " + file2ID;
    Thanks for your help, but it did not work.

Maybe you are looking for

  • File adapter to pick a single file

    The scenario is PI File adapter would pick files from a 3rd party FTP location. The 3rd party is placing files with file names using date time stamp. The requirement is to process one file at a a time - I have mentioned the Processing Sequence as 'By

  • A suggestion for a way to make auto correct better....

    In future software updates, could autocorrect suggestions pop up somewhere down in the vicinity of the keyboard as well as in the text field? I hunt and peck with my thumbs and am not usually looking up at the top of the page where my text is appeari

  • How to get the uuid of file?

    I seem to recall that although a file has a human friendly name in the finder (say dog.jpg) the OS gives it a less friendly code (i'm guessing a numerical or alphanumeric string of some sort) . I'm not sure whether it would be technically correct to

  • Idea Center B520 - how to add second monitor?

    I want to add a second monitor to my B520, but the only monitors I have connect with a DVI cable.  I don't see a DVI plug anywhere on the B520.  Is there a way?  If not, if I buy a monitor with HDMI connections, can I connect it to my B520 using HDMI

  • Illustrator 10 and Vista

    I have had Illustrator 10 installed on my PC with Vista for about a year now with no problems, but now all of a sudden it won't work! I can't really afford CS3 (the only version "officially" supported by Vista) and I need Illustrator for both work an