close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Posting to two DB tables from one form

Thread began 12/23/2012 6:07 pm by mrs | Last modified 12/26/2012 11:05 am by Ray Borduin | 789 views | 1 replies |

mrs

Posting to two DB tables from one form

Hi, I am trying to create a small forum for a site, and I am trying to allow users to post up to five images per posting. What I am trying to do is have the text of the forum (the initial thread and replies) post to one table, and then have the images post to another table. My reason for doing it in two tables is because I want to utilise the images elsewhere. in the site away from the forum.

I have in the past posted to two tables from one form, but I didn't need to two tables to relate to each other once entered into the database.

What I need to know now is how to post to two tables and ensure that any images posted to the image table are related to the ID that is created when posting to the threads and replies table. Basically, when I insert a new thread/reply, a new ID is created in the table, and any images inserted need to take on that new ID so I can pull them into the correct thread/reply... but how?

I think it has something to do with the value in the general tab of DataAssist's Insert Record interface, but I'm not entirely sure if this is correct, and even if I am, what do I put there?

Is DataAssist able to use two tables when creating the insert now? In the past I seem to remember having to run DA twice, or run it once, then run DW's built in insert!

Thanks

Sign in to reply to this post

Ray BorduinWebAssist

I think you can run the Data Assist wizard for the main table. Then add the upload fields and apply the Data Assist Server Behavior "Insert Record" for the file upload fields added manually.

The first insert record (applied by the wizard) will store the inserted id as a session variable, so you can use that session variable when binding the other inserts for the files to store the new record's ID.

This is something we could help you with in a premiere ticket if you are having difficulty getting it worked out. Just give us a call and we can schedule a training with one of our engineers if you need help.

Sign in to reply to this post
Did this help? Tips are appreciated...

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