NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

NetBeans MS Access ODBC Error- Too many Client tasks

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
Dezz18



Joined: 28 Sep 2010
Posts: 2

PostPosted: Tue Sep 28, 2010 2:31 pm    Post subject: NetBeans MS Access ODBC Error- Too many Client tasks Reply with quote

Hi, I'm using Netbeans 6.9. I have a program that accesses a database. I typed the connection code in a class and each jFrame uses that class each time. After th program accesses the database many times, i get the following error- "[Microsoft][ODBC Microsoft Access Driver] Too many client tasks." I'm new to NetBeans

Windows 7 32bit
MS Access 2007
NetBeans 6.9

Heres my connection code :
Code:
 MainDBClass()
      {
    databc=two.databc;
           System.out.println(databc);

           try
         {
            Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
            System.out.println("Driver Successfully Loaded");
         }
             catch(ClassNotFoundException e)
            {
               System.out.println("Unable to connect");
            }

         try
         {

            String filename = "TheDB.mdb";
            String database = "jdbc:odbc:Driver={Microsoft Access Driver (*.mdb)};DBQ=";
            database += filename.trim () + ";DriverID=22;READONLY=true}";
            conn = DriverManager.getConnection (database, "", "");
            System.out.println ("Connection to TheDB database successfully established");
if(databc==1)
{
    conn.close();
    System.out.println("Database connection closed");
databc=0;
}
         

         }
             catch(Exception e)
            {
               System.out.println(e.getMessage());
               JOptionPane.showMessageDialog(null, e.getMessage());
            }
      }


The database is accessed less than 100 times before this error occurs. Please help me solve this error.
Thank you.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo