InstantDB Project
About InstantDB
Project Mail Lists
Short History
Reporting Bugs
Screen Shots
3rd Party Examples
FAQs

Software
Downloads
Documentation
CVS Repositories
Roadmap
License

About Enhydra.org
Who We Are
News, Articles & Events
Getting Involved
Contact Us

Community
Demos
Contributions
Resources
Case Studies
On The Edge! -NEW-
Commercial Vendors


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: InstantDB: Connection established during importing data


Krishna

If an InstantDB database A is currently open in another JVM then you will
receive errors if you try to import from it. If you are certain that A is a
readonly database, then you can safely set recoveryPolicy=1 in a.prp. If A
could have been updated then should not try to import from it until it has
been safely shut down.

If A is closed when you do the import then it should work - see the attached
script.

Regards

Pete

--

Peter Hearty                         peter.hearty@lutris.com
Lutris Technologies (UK)        http://www.lutris.com
----- Original Message -----
From: "Krishna Gurusamy" <kgurusamy@ecdev.fedex.com>
To: <instantDB@enhydra.org>
Sent: Tuesday, October 03, 2000 4:35 PM
Subject: InstantDB: Connection established during importing data


> hi,
>   When i tried importing data from database A to two tables of database
> B using the following statements
> (Database A has tables A1 and A2...and database B has tables B1 and B2)
> 1.import B1 from 'jdbc:idb:A.prp' using 'Select *  from A1'
> 2.import B2 from 'jdbc:idb:A.prp' using 'Select col1,col2 from A1'
>   I get an exception that  'Table A1 is i  use by another jvm'.How do i
> release this connection established by the import statement to this
> table A1.I cant use the
> idbTrigger object to get the connection object corresponding to this
> table A1 since i do not find any event that could instantiate such a
> trigger that doesnt update A1 but mereley reads data from it.
>
> with regards,
> Krishna
>
>
> --------------------------------------------------------------------------
---
> To unsubscribe from this mailing list, send email to majordomo@enhydra.org
> with the text "unsubscribe instantdb" in the body of the email.
> If you have other questions regarding this mailing list, send email to
> the list admin at owner-instantdb@enhydra.org.
>
d org.enhydra.instantdb.jdbc.idbDriver;
;o jdbc:idb=c:\instantdb\bugs\sample.prp;
o jdbc:idb=c:\instantdb\bugs\a.prp;

SET EXPORT "trace.log" TRACE 6;

drop table a1;
create table a1 (int1 int, char1 char(10));
insert into a1 values (1, "aaaa");
insert into a1 values (2, "bbbb");
q select * from a1;
c close;

o jdbc:idb=c:\instantdb\bugs\sample.prp;
SET EXPORT "trace1.log" TRACE 6;
drop table b1;
drop table b2;
create table b1 (int1 int, char1 char(10));
create table b2 (int1 int, char1 char(10));
import b1 from url "jdbc:idb:c:/instantdb/bugs/a.prp"
 using "select * from a1";
import b2 from url "jdbc:idb:c:/instantdb/bugs/a.prp" 
 using "select int1,char1 from a1";
q select * from b1;
q select * from b2;

c close;
c exit;