close ad
Help us test the new Databridge BETA with MySQLi support
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

The MRT server behavior can't transfer other option table's column data ?

Thread began 11/11/2009 12:20 pm by kakadong | Last modified 11/17/2009 9:25 pm by Eric Mittman | 3472 views | 7 replies |

kakadong

The MRT server behavior can't transfer other option table's column data ?

There are 3 tables ,
Main is Pol table , Option is Item table and Relational Table is PolItem table .

the step :
1. I use WADA wizard to make the insert page
2.In insert page , made a secondary table "A", and make a Recordset(SelectAllItem) which is "select * from item" .
3. In binding panel , drag and drop the proper data into the table "A" .
4. Use "Repeat Selection" server behavior ,so that all data in recordset(SelectAllItem) can show on the page
5.Use Manage Relation Table server behavior ...
6.In the step4 of the wizard, the column `pow2` and `powfee` I use the recordset(SelectAllItem) pow2 and powfee in binding panel .... (that's must be the problem)
7.Test the page , and everything goes well in PolItem table except the pow2 and powfee column .... No matter which rows of data in Item table insert into PolItem table , the value of `pow2`and`powfee` in PolItem tabe is the 100 and 1000 (the first row of Item table)
8. So I made another Recordset(SelectPow2Powfee),and wish to select the right value of `pow2`and`powfee`, but No Luck..

So please help me...
I have tried and error all day long.... I can't solve this problem...
I also tried the repeat region server behavior .. and got all the same results..

the file I upload is the database structure and the insert page ...
please feel free for more information .

Thanks a lot in advance ...
and sorry for poor English ....

Attached Files
1.zip
Sign in to reply to this post

Eric Mittman

I think you have got this mostly correct, the only problem that I can see is that you are binding the column in your relating table to the values from your SelectPow2Powfee recordset. Since this recordset is filtered to the first item id from your other recordset you will only insert the values for this first item id.

What I did to update it was to just use the bindings for these columns from your select all recordset. When I gave it a try like this I was able to insert a new record into the pol table and every value that was checked was inserted as a new record in the politem table. I'm including a screen shot of the changes I made for reference.

Since you are not using the bindings from the second recordset for the MRT it does not seem necessary to have this recordset on the page.

Sign in to reply to this post

kakadong

Sorry , it didn't work ..

Since I have tried the solution you provided , it didn't change the Pow2 and Powfee at all . I have made a compelete New insert page for trying the things you tell me . But ,feel pity that didn't work . Again ,I upload the insert.php and the database structure and data for you so that you can simply check the checkbox and insert and will see that PolItem data table with the same value of pow2 and powfee column .( if you used the data I provide , the Pow2 coumn value will be *all* 100 and Powfee column value will be *all* 1000 ) So, there must be something wrong with it , but I don't have any clue about it.

I don't know where the problem is ,and supposed maybe this is a bug in MRT server behavior .

What I upload is everything in my test site , and You can See What I am saying .
Any suggestion will be appreciate.
Thanks.

Attached Files
1.zip
Sign in to reply to this post

Eric Mittman

I have done some more testing and have discovered why you are having problems with this. The pow2 and powfee that you would like to insert into the politem table are not from the repeated selection. Specifying just the values from one of the recordsets will not work since these values are not recorded from the repeat selection.

When using the manage relational table server behavior it is designed only to help you craft a joining table that will hold just the id values to match records from the other two tables.

The type of insert that you are wanting to perform in this page will not be possible with a MRT since you will end up with a table that just holds the id's from these tables. This should be enough to get back any information about a particular item based on the id and the same goes for the pol.

If you would like to add to this other table to with multiple records at once you would need to make use of the DataAssist Multiple insert. Sorry for the earlier confusion on this.

Sign in to reply to this post

kakadong

you mean that I don't have to use the relational server behavior?

I tried the insert multiple records server behavior , but still confusing .
Can you give me more clear steps to acheve this?
I have read the solution recipies , and feel confused because the pow2 and powfee data is already in the Item Table , and I don't have to make the textfield .
Please give me more information about what I want to do .
Thanks for your patience.

Sign in to reply to this post

Eric Mittman

This is not a very straight forward implementation of either the multiple insert or MRT. If you would like to get all of this info into a single new table it will require a bit of custom development along with the multiple insert server behavior. This is because the insert is not designed to work with existing records and selecting the record to insert is not a part of the server behavior.

Since you have the information already recorded in two unique tables you should just be recording the id's from these two tables into your relational table. This way whenever you want to get at this info you can just use the relational table in a join query to create the recordsets or views of the data that you need. There is no real benefit to duplicating this info in another table, you just need this table to manage the relationship between the other two.

Sign in to reply to this post

kakadong

ok, Now I know what you mean .
Thanks a lot .
I don't need the value of pow2 and powfee in politem table , since they are already in the item table . (wondering if this is what you mean??)
what I need is only MRT .
If I need the pow2 and powfee , I can join the two tables .

thank you .
Now I know what to do next ...

Sign in to reply to this post

Eric Mittman

You are exactly rite, sorry that I could not convey that as nicely as you have put it here. You should use the MRT and then just use SQL to get the results that you need with a join or creating a view.

Sign in to reply to this post

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...