Tariq
Yes - it allows multiple copies of the same primary key. See
http://instantdb.enhydra.org/project/faq/index.html
for details. I suspect that some day this will become an option and the default will be to
enforce PK uniqueness.
If you did your rollback in auto-commit mode then it will indeed have no effect. You need
to add the line:
c autocommit off;
to your script before doing the insert, or call Connection.setAutoCommit (false) if doing
it from code.
Pete
----- Original Message -----
From: "Tariq Hasnain" <tariq_hasnain@usa.net>
To: <InstantDB@enhydra.org>
Sent: Tuesday, April 17, 2001 2:13 PM
Subject: InstantDB: Problem with Primary Key and Rollback
> Hello there,
>
> I have created a table using following sql file.........
>
> d org.enhydra.instantdb.jdbc.idbDriver;
> o jdbc:idb:database.prp;
>
> e DROP TABLE TEMP;
> e CREATE TABLE TEMP (
> id int PRIMARY KEY,
> parentid int,
> type varchar2(100),
> xmlData longvarbinary
> );
> e CREATE INDEX parentidindex ON AFITABLE ( parentid );
> e CREATE INDEX typeindex ON AFITABLE ( type );
> c close;
>
> First thing it is allowing inserts with same id field (i.e. no primary key
> check ).......
>
> Second thing when i insert a record and call rollback before closing a
> connection it still saves changes........
>
> Please help......
>
> Tariq
>
> ____________________________________________________________________
> Get free email and a permanent address at http://www.netaddress.com/?N=1
> -----------------------------------------------------------------------------
> 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.
>
-----------------------------------------------------------------------------
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.
|