close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Multiple Tables in Data Assist Admin Pages

Thread began 9/10/2009 4:29 pm by elewis93815 | Last modified 10/04/2009 11:00 am by neil186288 | 1600 views | 9 replies |

elewis93815

Multiple Tables in Data Assist Admin Pages

Can anyone tell me if it is possible to create Admin pages to include more than one table? This is for a website to track students daily lessons and grades. Ultimately we would like to do all updates for each student on just one Admin Update Page. The students information is split out into several tables.

Thanks

Sign in to reply to this post

Jimmy Wu

You can apply the update server behavior multiple times on one form, allowing you to update multiple tables successfully from one update form.

Sign in to reply to this post

jenkolaka19379118

Similar issue

I have a similar question.

Can I create more than one insert record page? for example in the admin of my site i would need to create, new courses (has its own table) and new events, but because I have several tables in my database would i need to create an insert page for each table/ form.

Sign in to reply to this post

Jimmy Wu

You can put all the insert forms on one page if you like. You would just go through the process of adding the recordset and adding the different search criteria in the DataAssist Search Wizard for each of the searches you want to perform.

Sign in to reply to this post

georgina_barrett_187762

I have 3 tables: a Book table, a Category table and a CategoryList table that is a join table for the other 2. It stores book ids and category ids.

I created a recordset to list all the categories and then used a repeat selection around a checkbox to display all the categories with checkboxes next to them.

I have successfully created an insert form that inserts a book as a single insert and on the same page a multiple insert that inserts all the categoryids from the category table into the category list table via the checkboxes on the page (I hope you can understand this)

I also did the manage relational tables for all 3 (I wasn't sure if this was necessary)

This all works perfectly.

I am now trying to do the same with the update page but I am having a problem tying the current data into the check boxes. I have successfully created the update form for the single update of the books. I have created a recordset to list all the categories (as I did on the insert page) But I don't know how to check the checkboxes that are already listed in the database. I guess I need to create another recordset to display all the categorieslist ID's that are associated to that book - but I don't know how to tie these together. Also when I update the form the categoriesList table doesn't update. I suppose I could simply use an insert multiple form for the categoriesList table and force the user to check all the categories again but it would be more professional if I could display the current ones and allow them to add/remove the ones they want.

Sign in to reply to this post

Jimmy Wu

If your recordsets are a one to one correspondence, you can sort them both by the foreign key that links the two tables. This will ensure that the results are in the same order, so that the first record matches with the first record, second with the second, etc in the two recordsets. If this is the case you can then have a loop that steps through both recordsets at the same time and inserting the code to check the checkbox if needed.

If they are not one to one correspondence, you will need to use two loops to process the information. The first loop will step through one of the recordsets and an inner loop will loop through the other recordset for each record in the first recordset. In the inner loop, you will check for if there is a match and if there is you will insert the code to check the checkbox. Make sure you remember to set the second recordset to start back at the first record in the recordset just after the inner loop.

Hope that helps.

Sign in to reply to this post

georgina_barrett_187762

It is a one to many relationship. I am not sure how to do the looping. Do you have any tutorials on how to do it?

Sign in to reply to this post

Jimmy Wu

Here are the methods for manipulating recordsets:
ado_ref_recordset.asp

To loop through the recordset you would basically use the MoveNext function and the MoveFirst to go back to the first record.

Sign in to reply to this post

jurinski334466

Need more detailed explanation please!

Could someone else at WA please take a stab at answering the questions raised above? That last reply didn’t quite do it...

I too would like to see some documentation on how to perform multiple inserts and updates on a page or on recordsets involving more than one table. I would like to see a visual demonstration of how to do these inserts or updates to fully understand how this works. Unfortunately without any visual reference, when you suggest applying repeated inserts or updates to a page, I am too inexperienced to know whether you‘re referring to a page that contains multiple forms and insert buttons that continually posts back to itself, or referring to one page containing linked inserts and one insert button (which is what I want to accomplish).

WA has stated before in other forum posts and elsewhere that your tools can perform functions involving multiple linked tables and/or multiple inserts etc. I could not find much information about these topics other than a bare bones description of how to use the Manage Relational Table server behavior in the Data Assist help files. I have looked through all the documentation, but must be overlooking the information. Would you please direct me to where this information is fully explained in your guides and tutorials?

I need help understanding (in very basic terms) what data should be selected, and in what order, to correctly link inserts and updates that use more than one table on a page. As a beginner, I am finding the area covering the correct use of server behaviors, session variables, parameters, and hidden fields very confusing and could greatly benefit from some clarity to fully utilize your tools. Also, it would help my understanding if you could please direct me to an example where I can see the actual manipulation of the code and recordsets when applying these techniques. Thank you very much.

Sign in to reply to this post

neil186288

I would like to see that too. I expect the information is all around these pages somewhere - but it would be excellent to see it all in one explanatory document - laid out in very simple baby-steps.

Thanks.

Sign in to reply to this post
loading

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...