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.
%

Similar Messages

  • SQLException:java.sql.SQLException:[Microsoft][Odbc driver for Oracle]

    hi all..im tryin to connect to Oracle db from java application.. i can complile the code but when it comes to executing d cod im gettin d followin error.. pls help me out.. here is d error
    SQLException:java.sql.SQLException:[Microsoft][Odbc driver for Oracle][Oracle]

    henrymania wrote:
    This is d driver im loadin..
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    and this is URL im assiging....
    "jdbc:oracle:thin:@192.168.32.68:1521:test";
    Here test is my sid name....highly unlikely, as that's not an ODBC driver nor is it an ODBC DSN.

  • Java.sql.SQLException[Microsoft][ODBC Driver for Oracle][Oracle]

    I have just installed Oracle8i and i m trying to connect a project to d database using ODBC. I gave
    Driver class name as sun.jdbc.odbc.JdbcOdbcDriver
    Connection Info as jdbc:odbc:dbgen dbgen is my project name
    Database name as Oracle
    Username as scott
    Password as Tiger
    i am getting this exception
    java.sql.SQLException[Microsoft][ODBC Driver for Oracle][Oracle]
    can ne one help me out plz???

    hi
    dbgen is your project name? it should be the dsn name that has to be mentioned. Go to control panel->administrative tools>data sources and add the type of driver required.
    import java.sql.*;
    import oracle.jdbc.pool.*;
    public class TestThinDSApp {
      public static void main(String args[]) throws ClassNotFoundException,
          SQLException {
        // These settings are typically configured in JNDI
        // so they a implementation specific
        OracleDataSource ds = new OracleDataSource();
        ds.setDriverType("thin");
        ds.setServerName("dssw2k01");
        ds.setPortNumber(1521);
        ds.setDatabaseName("orcl"); // sid
        ds.setUser("scott");
        ds.setPassword("tiger");
        Connection conn = ds.getConnection();
        Statement stmt = conn.createStatement();
        ResultSet rset = stmt
            .executeQuery("select 'Hello Thin driver data source tester '||"
                + "initcap(USER)||'!' result from dual");
        if (rset.next())
          System.out.println(rset.getString(1));
        rset.close();
        stmt.close();
        conn.close();
    }Hope this helps to some extent..
    Edited by: S.Manikandan on Jun 21, 2008 10:07 AM

  • Java.sql.SQLException:[Microsoft][ODBC Driver]Too few parameters Expected 1

    Hi friends,
    Greetings.
    i am trying to work with my inventory management system. My code is as follows and i getan error as follows:
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Too few
    parameters. Expected 1.
    CODING:
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    public class iteminsert extends HttpServlet
    public void doGet(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException
    Connection con;
    Statement r,s;
    ResultSet rs;
    int flag1=0;//flag1 is for seeing if itemcode already exists
    String str1,str2;
    String s0=req.getParameter("itemcode");
    String s1=req.getParameter("itemname");
    int s2=Integer.parseInt(req.getParameter("unit"));
    int s3=Integer.parseInt(req.getParameter("minlevel"));
    int s4=Integer.parseInt(req.getParameter("rate"));
    int a=1;
    int b=0;
    res.setContentType("text/HTML");
    PrintWriter out=res.getWriter();
    try{
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    con=DriverManager.getConnection("jdbc:odbc:stocks");
    r=con.createStatement();
    s=con.createStatement();
    rs=r.executeQuery("select * from stock where itemcode='"+s0+"'");
    while(rs.next())
    flag1++;
    if(flag1!=0)
    out.println("<body><h1 align=\"center\"><font color=\"green\">INVENTORY MANAGEMENT SYSTEM</font></h1><p>ITEM CODE ALREADY EXISTS!!!!</p><p>To insert an item with a different code, <a href=\"http://localhost:8000/stock/insert.html\">Click here</a> .</p><p>To go back to the main menu <a href=\"http://localhost:8000/stock/index.html\">click here</a></p></body>");
    else
    str1="insert into stock values('"+s0+"','"+s1+"',"+s2+","+s3+","+s4+","+a+")";
    str2="insert into stock values('"+s0+"','"+s1+"',"+s2+","+s3+","+s4+","+b+")";
    if(s3<=s4)
    s.executeUpdate(str2);
    out.println("<body><h1 align=\"center\"><font color=\"green\">INVENTORY MANAGEMENT SYSTEM</font></h1><p>ITEM HAS BEEN INSERTED. HOWEVER REORDER LEVEL IS <b><u>MORE THAN</u></b> QUANTITY AT HAND</p><p>To buy more <a href=\"http://localhost:8000/stock/purchase.html\">Click here</a></p><p>To go back to the main menu <a href=\"http://localhost:8000/stock/index.html\">click here</a></p>");
    else
    s.executeUpdate(str1);
    out.println("<body><h1 align=\"center\"><font color=\"green\">INVENTORY MANAGEMENT SYSTEM</font></h1><p>ITEM HAS BEEN INSERTED.</p><p>To buy more <a href=\"http://localhost:8000/stock/purchase.html\">Click here</a></p><p>To go back to the main menu <a href=\"http://localhost:8000/stock/index.html\">click here</a></p></body>");
    con.close();
    catch(Exception e)
    out.println("error"+ e);
    Please help. I have to use only Create statement and not PreparedStatement :(
    Thank You.
    Regards.
    Aravind

    your code is wrong on so many levels.
    you should not be embedding HTML in Java objects this way. wrong, wrong, wrong.
    JSPs are what you should be using.
    look at this line:
    rs=r.executeQuery("select * from stock where itemcode='"s0"'");the SQL query is supposed to be a bloody string. yours won't even compile.
    do it this way:
    PreparedStatement ps = connection.prepareStatement("select * from stock where itemcode = ?");
    ps.setString(1, itemCode);
    rs = ps.executeQuery();you don't close resources. you don't use code tags.
    too much wrong to fix here.
    %

  • Java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name no

    Hi,
    I am working with the following program. The same program is working with JBOSS but not with Tomcat-5. I am using MS-Access. Working with this program is very essential now. Please Help me.
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    public class MDBGetData extends HttpServlet{
         Connection con=null;
         Statement st=null;
         ResultSet rs=null;
         public void doGet(HttpServletRequest req,HttpServletResponse res)throws ServletException,IOException{
              PrintWriter out=res.getWriter();
              out.println("Connecting To data Base");
              try{
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   con=DriverManager.getConnection("jdbc:odbc:cmpny","sa","");
                   st=con.createStatement();
                   out.println("Connected to database");
                   rs=st.executeQuery("select * from cmpny");
                   while(rs.next()){
                        out.println(rs.getString(1));
              catch(Exception e){
                   System.out.println("Error While Creating The connection : " +e);
    }

    This is code for connect mySQL database:
    Connection con=null;
         Statement stmt=null;
         ResultSet rs=null;
         // Set up the JDBC connection
         try {     
              // Create
              InitialContext ctx=new InitialContext();
              ds=(DataSource)ctx.lookup("java:comp/env/jdbc/mysql");
              con=ds.getConnection();
              stmt=con.createStatement();
              rs=stmt.executeQuery(sqlQuery);
    catch(SQLException e){
    Note: before you use these code you have to set datasource in tomcat
    I will show you how to do it next post.

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

    Hi, I'm getting an error in the eManager server log when running a load test:
    Error executing prepared statement: sun.jdbc.odbc.JdbcOdbcPreparedStatement@189ff39
    java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Invalid argument.
    I found this on the MS site concerning the 2GB size limitation for MDB files:
    http://support.microsoft.com/?id=835416
    The RSWReport.mdb file is more than 2GB in size, so I'm assuming that this file is causing the problem.
    Is there anyway to purge this file? Will compacting the file or splitting the file as MS recommends fix the problem?
    James

    You can always just create a new mdb file and run with that. I typically create a new MDB for each project I work on, or build of an app.
    The windows ODBC controls will let you create a blank MDB file.
    1. Start - Settings - Control Panel - Administrative Tools - Data Cources (ODBC)
    2. Chose the reporter ODBC - click configure - create. I tend to name by date and project, etc.
    3. In e-Load, chose Manage - Databases - New. In that window, chose 'Create e-Load tables in the database, give it a name, enter the DSN name, chose 'set as current e-Load database' and click ok.
    You should be good to go with a clean MDB file. If I missed a step or the instructions aren't clear let me know.
    SQL will give you better performance, but if its not an option managing the MDB files will help.
    - BT

  • Java.sql.SQLException: [Microsoft][ODBC Excel Driver] Syntax err

    Hi
    I am trying to implement the bulk data transfer from source(DB) and target(Excel File) but i am getting the below error.
    can some please help me on that.
    Knowledge USED:
    LKM SQL TO SQL
    IKM SQL INCREMENTAL UPDATE
    CODE:
    create table C$_0Sheet1
    *     C1_TEST     NUMBER(15)*
    ODI-1228: Task SrcSet0 (Loading) fails on the target MICROSOFT_EXCEL connection Ms_EXCE_TGT.
    Caused By: java.sql.SQLException: [Microsoft][ODBC Excel Driver] Syntax error in CREATE TABLE statement.
         at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957)
         at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114)
         at sun.jdbc.odbc.JdbcOdbc.SQLPrepare(JdbcOdbc.java:4830)
         at sun.jdbc.odbc.JdbcOdbcConnection.prepareStatement(JdbcOdbcConnection.java:475)
         at sun.jdbc.odbc.JdbcOdbcConnection.prepareStatement(JdbcOdbcConnection.java:443)
         at sun.reflect.GeneratedMethodAccessor70.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at oracle.odi.core.datasource.dwgobject.support.OnConnectOnDisconnectDataSourceAdapter$OnDisconnectCommandExecutionHandler.invoke(OnConnectOnDisconnectDataSourceAdapter.java:200)
         at $Proxy2.prepareStatement(Unknown Source)
         at oracle.odi.runtime.agent.execution.sql.SQLCommand.doInitializeStatement(SQLCommand.java:83)
         at oracle.odi.runtime.agent.execution.sql.SQLCommand.getStatement(SQLCommand.java:117)
         at oracle.odi.runtime.agent.execution.sql.SQLCommand.getStatement(SQLCommand.java:111)
         at oracle.odi.runtime.agent.execution.sql.SQLCommand.execute(SQLCommand.java:158)
         at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:102)
         at oracle.odi.runtime.agent.execution.sql.SQLExecutor.execute(SQLExecutor.java:1)
         at oracle.odi.runtime.agent.execution.TaskExecutionHandler.handleTask(TaskExecutionHandler.java:50)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.processTask(SnpSessTaskSql.java:2913)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java:2625)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatAttachedTasks(SnpSessStep.java:558)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java:464)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java:2093)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$2.doAction(StartSessRequestProcessor.java:366)
         at oracle.odi.core.persistence.dwgobject.DwgObjectTemplate.execute(DwgObjectTemplate.java:216)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.doProcessStartSessTask(StartSessRequestProcessor.java:300)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor.access$0(StartSessRequestProcessor.java:292)
         at oracle.odi.runtime.agent.processor.impl.StartSessRequestProcessor$StartSessTask.doExecute(StartSessRequestProcessor.java:855)
         at oracle.odi.runtime.agent.processor.task.AgentTask.execute(AgentTask.java:126)
         at oracle.odi.runtime.agent.support.DefaultAgentTaskExecutor$2.run(DefaultAgentTaskExecutor.java:82)
         at java.lang.Thread.run(Thread.java:662)

    Hi
    i refereed the blog and i modified the same but still it is throwing an error.
    ODI-1228: Task SrcSet0 (Loading) fails on the target MICROSOFT_EXCEL connection TGT_Excel_TEST.
    Caused By: java.sql.SQLException: [Microsoft][ODBC Excel Driver] Syntax error in CREATE TABLE statement.
    Code:
    create table C$_0POSITION_DEFINITION_ID
         C1_POSITION_DEFINITION_ID     NUMBER(15) ,
         C2_ID_FLEX_NUM___________     NUMBER(15)
    The above code is executed in the sql developer and it's successfully created the table.
    Edited by: 985498 on May 16, 2013 3:54 AM

  • 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]

  • 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.

  • 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.

Maybe you are looking for

  • Spry menu look fine in Firefox, Safari but not Intenet Explorer

    Help how cann I Spry working fine in Internet Explorer!!! Look with firefox this page and with Intenet Explorer and see the differents. In Firefox the menu show nice, but into Intenet Explorer not!! When i open the same page lokale the page ist good

  • Will this hard drive work with an HP Probook 4415s

    Hello,  I have an HP Probook 4415s (black model with 14 inch display). Would a spare hard drive I had, part number 455954-001, work with this laptop? Thanks! This question was solved. View Solution.

  • Problem in Workload Analysys transaction ( ST03)

    Hi all when i run transaction ST03 and go to expert mode and try to see the detailed analysys , its not showing any statistics and showing error ' RFC PROBLEM : NO DATA AVAILABLE" Is any setting required in RFC or anywhere ? Can somebody help me on t

  • Thanks Tuus! -- T61 replacement board

    I wanted to make a new thread, not only thanking Tuus, but to let others know that it is possible to get a fix for dead or dying T61s. There are other threads on this but I'd like to share my experience. I got my T61p about 4 years ago and it had wor

  • Resetting account's Security questions

    How can I reset my security questions. I have forgotten them.... Please help!