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

CVS Repositories

Who We Are
News, Articles & Events
Getting Involved
Contact Us

Case Studies
On The Edge! -NEW-
Commercial Vendors

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

InstantDB: Re: Referential Integrity not enforced sometimes.

Forgot to add that the constraint is not enforced again if I separate
the 'create' and 'insert' statements between 2 executions of the
ScriptTool class.

If I put them in the same sql1.txt file and run it in one shot I get
this 'FK insert error...'.

But if I create the tables in one run and insert the row in another it
goes inside the table without complaining.

Any idea as to what is happening ?

thanx in advance,

Balaji Krishnamurthy wrote:
> 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
>         at org.enhydra.instantdb.db.SQLProg.execute(
>         at
> org.enhydra.instantdb.jdbc.idbStatement.execute(, Co
> mpiled Code)
>         at
> org.enhydra.instantdb.jdbc.idbStatement.executeUpdate(idbStatement.ja
> va:103)
>         at,
> Compiled Code
> )
>         at 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
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