CodeCharge Studio
search Register Login  

Web Reporting

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

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Custom Update for Editable Grid with Multiple Tables

Print topic Send  topic

Author Message
swilson


Posts: 84
Posted: 10/19/2005, 2:50 PM

I have an editable grid generated from a many-to-many data source query (using the visual query builder).

The query includes three tables: two are joined many to many and the "joiner" table.

I am trying to use a checkbox field to update a field on the joiner table and found the potential to do this with a custom update.

It's my understanding that a custom update will let me update one table when more than one table is used for the grid. But, my update does not work when I submit.

Without using a clever work-around, what would be the most probable errors?

Does the custom update feature serve some other purpose? Or could it just be my query is queerly configured?

Ideas? THANKS!
_________________
It continues to amaze me, how often the solutions to seemingly complex problems are so very simple.
View profile  Send private message
Edd


Posts: 547
Posted: 10/19/2005, 3:14 PM

What have you set the custom option to, Table / Stored Procedure ? etc.

Check that if it is table that all of your fields are mapped correctly to that table. Remember that custom usdates default their source to a URL paramater not a CONTROL.

Edd
_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
swilson


Posts: 84
Posted: 10/19/2005, 3:31 PM

Here's what I have:

Tables:
Aircraft: Records on unique aircraft. One aircraft will relate to many Service Bulletins.
SEB: Records on unique Service Bulletins. One bulletin will relate to many aircraft.
SBN_ACSN: A table with thousands of individual records of AircraftID to SEBID matches. This table also has a Complied field that records if one individual service bulletin instruction has been applied to one individual aircraft.

I have an editable grid named: Aircraft_SBPDFFiles_SEB_S whose datasource is Aircraft, SBN_ACSN, SEB. Click ... and I used the build query to relate the tables with inner joins and select the fields that are displayed in the query - all of which are labels, except the one record, Complied, that I want to update. There is one Where on the table, made from a URL parameter called Aircraft_ID. This page is accessed from a hyperlink from the AircraftMaster page which sends the individual Aircraft_ID to be queried.
_________________
It continues to amaze me, how often the solutions to seemingly complex problems are so very simple.
View profile  Send private message
swilson


Posts: 84
Posted: 10/19/2005, 3:34 PM

Ooops. Hit enter. There's more...
_________________
It continues to amaze me, how often the solutions to seemingly complex problems are so very simple.
View profile  Send private message
swilson


Posts: 84
Posted: 10/19/2005, 3:50 PM

The only field on the grid to update is a Checkbox1, for Complied, a boolean. All other records on the grid are labels.

Incidentally, as I write this, I just realized that the Aircraft table is not required, so I removed it. Still not updating the checkbox to the database though. The url parameter still points to the ACSN Aircraft ID field.

I set the Custom Update to Table and the Datasource... Parameters Field: Complied, Boolean Parameter Source Complied, I tried Contol and DataSource Column. I added two Where parameters, ID and Aircraft_ID both set to Data Source Column, and I tried URL for the Aircraft_ID as well.

I double-checked parameters with an update grid build using the builder on the SBN_ACSB table alone, following Peter's suggestion on another post. This grid works perectly, updating the nonupdating grid as it should. Should teach it a thing or two!

So those are my page specs.... whew!
_________________
It continues to amaze me, how often the solutions to seemingly complex problems are so very simple.
View profile  Send private message
Edd


Posts: 547
Posted: 10/19/2005, 5:23 PM

Are these records being inserted OR updated?

Edd

_________________
Accepting and instigating change are life's challenges.

http://www.syntech.com.au
View profile  Send private message
swilson


Posts: 84
Posted: 10/19/2005, 8:44 PM

Updated.
_________________
It continues to amaze me, how often the solutions to seemingly complex problems are so very simple.
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.