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]

InstantDB: Referential Integrity not enforced sometimes.


Hi,
   Iam a new user to InstantDb. (Iam using version 3.26)

   I tried out the sql1.txt (after minor modifications) using the
ScriptTool class.

   I tried the foreign key constraint on a table and found that it is
enforced only if an insert is made using the ScriptTool class. (i.e
inside the sql1.txt or a similar file)

   It was not being enforced if I use my own Java code to load the idb
driver and insert records using JDBC calls.

   I get the following exception while using ScriptTool class.

java.sql.SQLException: java.sql.SQLException: FK insert error. Value, 9,
does no
t exist in column tester.id
        at org.enhydra.instantdb.db.SQLProg.execute(SQLProg.java:288)
        at
org.enhydra.instantdb.jdbc.idbStatement.execute(idbStatement.java, Co
mpiled Code)
        at
org.enhydra.instantdb.jdbc.idbStatement.executeUpdate(idbStatement.ja
va:103)
        at org.enhydra.instantdb.SampleThread.run(ScriptTool.java,
Compiled Code
)
        at java.lang.Thread.run(Unknown Source)
id,fullName,email,login,password

   But it does not complain in my own code.

   I find the record being inserted into the client table without any
corresponding record in the parent table.

   Is there is something that I could do to get this constraint enforced
in my code too ?

thanx,
balaji
-----------------------------------------------------------------------------
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.