Source language: Translate to:

Using DbpDefineRelationship

Questions about our Advanced Database plug-in

Moderator: Neosoft Support

Using DbpDefineRelationship

Postby phenix37 » Tue Feb 12, 2008 4:49 am

Using
DbpDefineRelationship

Is it normal when I use a relationship between several tables it is impossible to change the linked table?
For example:
Code: Select all
DbpDefineRelationship "ma_base" table1 "name" table2 "name" ""

The relationship works, but when I try to change a field of the table "table2" (ma_base.table2.montant), I can not.
phenix37
 
Posts: 107
Joined: Thu Apr 20, 2006 6:31 pm

Postby Neosoft Support » Tue Feb 12, 2008 12:07 pm

You should be able to make changes to the linked table. The sample Order Entry publication included with DBPro uses DbpDefineRelationship to link the order and orderdetails tables and both are editable.

Are you receiving any error messages?
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby phenix37 » Tue Feb 12, 2008 2:27 pm

Neosoft Support wrote:You should be able to make changes to the linked table. The sample Order Entry publication included with DBPro uses DbpDefineRelationship to link the order and orderdetails tables and both are editable.
Are you receiving any error messages?


No error messages.

I posted an example here
The 3 tables are displayed side by side.
When the relationship is active, it is impossible to modify the areas of the various tables.

Thank you
phenix37
 
Posts: 107
Joined: Thu Apr 20, 2006 6:31 pm

Postby Neosoft Support » Tue Feb 12, 2008 5:25 pm

Thank you very much for providing an example publication. That was extremely helpful.

From what I can tell the dbpDefineRelationship action isn't telling the detail table that it needs to save its data before the master table navigates to a new record. To work around the problem, you will need to manually save changes to the detail tables before navigating the master table. To do this, you can add a call to dbpSaveEdits to each of your master table's navigation buttons. For example, the master table's Next button should be changed to:

dbpSaveEdits "epreuve" "cautions"
dbpNext "epreuve" "equipes"

We will correct this problem in the next NeoBookDBPro update.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA

Postby phenix37 » Thu Feb 14, 2008 2:28 am

Neosoft Support wrote:dbpSaveEdits "epreuve" "cautions"
dbpNext "epreuve" "equipes"

We will correct this problem in the next NeoBookDBPro update.


Thank you very much.
It works perfectly.

NB: Would it not be simpler to call the command in the subroutine "OnChange " for table "Cautions" ?
phenix37
 
Posts: 107
Joined: Thu Apr 20, 2006 6:31 pm

Postby Neosoft Support » Thu Feb 14, 2008 4:54 pm

NB: Would it not be simpler to call the command in the subroutine "OnChange " for table "Cautions" ?


I don't think that would work because the OnChange subroutine is executed after the new record is displayed.
NeoSoft Support
Neosoft Support
NeoSoft Team
 
Posts: 5603
Joined: Thu Mar 31, 2005 10:48 pm
Location: Oregon, USA


Return to NeoBookDBPro

Who is online

Users browsing this forum: Bing [Bot] and 1 guest