CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Master Detail Forms

Print topic Send  topic

Author Message
strohtm

Posts: 13
Posted: 04/02/2004, 8:41 AM

I'm looking for help with master/detail (parent/child) edit forms.
I created a single record edit grid (record builder) for the parent that works well.
I then created a multi record edit grid (editable grid builder) that works for displaying the right data and adding data. But when you delete a record from it. After the delete when the screen refreshes it shows only one record. The last record that was entered. It also does not show the delete check box. I'm assuming it shows the data in the blank row as if I want to add the data as a new record. Hitting the submit button causes a duplicate record to be entered.

I've seen several things referancing master detail forms and an "Example Pack".
Where can I find the example pack?
View profile  Send private message
strohtm

Posts: 13
Posted: 04/02/2004, 9:02 AM

I found the examples on my computer. Somtimes I make it harder then it should be.
View profile  Send private message
peterr


Posts: 5971
Posted: 04/02/2004, 1:03 PM

Just please do not open the examlpes but use them as templates when creating new projects. Please see:
http://docs.codecharge.com/studio/html/ProgrammingTechn...xamplePack.html
http://docs.codecharge.com/studio/html/ProgrammingTechn...SSolutions.html
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
strohtm

Posts: 13
Posted: 04/05/2004, 4:12 AM

I modified my form similar to the example which seemed to be a step backwards.
I can't get the detail editable grid to even insert now. I keep getting an error message telling me that the foreign key is required. I made it a hidden field and not a hidden field. I copied the code from the before build insert of the example and I tried to use value for a control. I even tried differetn events. The only way I've been able to make a successfull insert was to put in default values in the grid textboxs. I spent several hours on this friday and was very getting very frustrated. I'm sure I wasn't thinking straight either.

I won't have time to work on today but should be able to get back to tomarrow.
I'll get the forms back into a know condition with know resaults (start over) and update the thread.

Thanks for the reply Peter. I when over the example pages and read the explanation that when with it. Because I won't be adding, or deleting from the master grid I assumed I only need the before build insert event on the detail grid.
View profile  Send private message
strohtm

Posts: 13
Posted: 04/07/2004, 12:00 PM

I approched this with a clear head today. My forms now work like they are supposed to. Similar to the examples.
The mistake I made initially was to my code that sets the record forign key was on the submit button. I put is on the before build insert like the example but then I made the mistake of not paying attention to upper/lower case.

When I realized that this afternoon everything works.

I didn't realize that this was case sensative. I'm using VBScript (ASP) which I though was not.

View profile  Send private message
Randall
Posted: 04/07/2004, 4:05 PM

While VBScript may not be case sensitive, your database back end may be.
peterr


Posts: 5971
Posted: 04/07/2004, 4:17 PM

Good point. VBScript isn't case sensitive but the database fields may be, plus the values stored in the variables are too. Since form/control/field names are often stored in variables, sessions and the URL - they all should be treated as case sensitive.
Because a=A is True but "a"="A" is not.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
strohtm

Posts: 13
Posted: 04/08/2004, 9:48 AM

The initial problem showed up again. It is reproducable and has nothing to do with upper and lower case. I'm guessing it has nothing to do with what event the code to set the forien key is on.

I have a date filed in the child record.
With a "CurrentDate" value in the default property of the date field the delete operation operates abnormally.
Taking the default value out makes the form work properly.

Can someone varify this or explain why.
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Web Database

Join thousands of Web developers who build Web applications with minimal coding.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.