|
-
Jun 3rd, 2003, 05:23 AM
#1
Thread Starter
New Member
Connect to an opend excel file
Hi,
Can you help me in this problem as soon as posible?
In a method of java class, I connect every 2 seconds to an excel sheet to read some data using the following lines within try..catch block
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
con=DriverManager.getConnection("jdbc: odbc:Excel_DSN");
st = con.createStatement();
but a memory usage increases with time
So I moved these 3 lines into a place to be excuted once, it works fine when the excel sheet is closed, but when I open it, an error appear:
"java.sql.SQLException: [Microsoft][ODBC Excel Driver] The Microsoft Jet database engine could not find the object 'table1'. Make sure the object exists and that you spell its name and the path name correctly."
this error caused by the line:
rs = st.executeQuery( "Select * from [table1]" );
which is excuted every 2 seconds.
I need the excel file to be opened all the time because it reads from DDE
So, my problem is: I would like to read from this excel file every while without problem and without memory increase or CPU increase..what should I do?
thanks
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|