Prev Previous Post   Next Post Next
  #1  
Old 5th March 2012, 10:53 AM
pierrotsc pierrotsc is offline
Member
 
Join Date: Nov 2011
Posts: 54
Default Referential integrity-Don't know what i am doing

If there are any example on how to setup a simple master/details database that when you insert a new record in the master, it will create one automatically in the details, please let me know.

Right now I am getting this error:
NexusDB: nxTable_trials: Referential Integrity Violation. Trials(Project_No) -> Projects(Project_No): Master record missing. [$2605/9733].

My master database is called projects:
Project_No (autoinc)
Description

Details database is called trials:
Trial_No
Project_No
Description

In the referential integrity of trials, I tell that Project_No from trial to be associated with Project_No from project.

I do the same thing under the component nxTable_trials. I tell it what the mastersource is and assign the index to match.

Under the newrecord property of the master table, I have this command:
nxTable_trials. insert; // to create a new detail record when a master one is created.

Under the new record property of the detail table, I have:
EmbeddedDM.nxTable_trials.FieldValues['Project_No'] :=
EmbeddedDM.nxTable_Projects.FieldByName('Project_N o')
.AsInteger;

Do I have to write that? Or is that supposed to be assign automatically?

Well, anyway, this setup triggers the error I wrote above.
If some kind soul can tell me on how to fix that, that would lower my frustration level.

Thanks.
P


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Referential Integrity question Scott Slater nexusdb.public.support 3 15th February 2012 07:41 AM
Referential Integrity pierrotsc nexusdb.public.support 2 25th January 2012 12:18 PM
Referential Integrity Mark Mitton nexusdb.public.support 1 3rd March 2006 01:09 PM
Re: V2 and referential integrity Robert Meek nexusdb.public.support 1 13th March 2005 09:14 AM
Referential integrity! Atmapuri nexusdb.public.support 6 30th September 2003 08:45 AM


All times are GMT +11. The time now is 12:09 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.