close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Databridge not inserting to database

Thread began 7/19/2013 7:04 am by ConduciveMammal | Last modified 7/19/2013 10:07 am by Jason Byrnes | 1179 views | 11 replies |

ConduciveMammal

Databridge not inserting to database

Hello,
I'm trying to use DataAssist Pages to insert a new category into my database but after I've uploaded everything online and try to add a new category, it doesn't show any error messages but when I look in my database, it hasn't saved it to the database.

This is the code that results from DataAssist Pages:

<input id="cats_name" name="cats_name" type="text" value="<?php echo((isset($_GET["invalid"])?ValidatedField("catstblinsert","cats_name"):"")); ?>" class="formTextfield_Medium" tabindex="1">

I've tried this several times in the past but it's never worked for me. I'm running DataBridge 1.1.4

Sign in to reply to this post

Jason ByrnesWebAssist

send a copy of the page please.

Sign in to reply to this post

ConduciveMammal

Thanks for the quick response.

I've attached the file and the page in question is in admin/cats_tbl_insert.php

Thanks again.
Liam.

Sign in to reply to this post

Jason ByrnesWebAssist

There is no insert record server behavior on that page.

open the server behaviors panel and click the plus button, select webassist -> Data Assist -> Insert Record -> Insert Single record to add the insert record behavior.

Sign in to reply to this post

ConduciveMammal

Thanks, I did try that but didn't know where to place it. Should it go inside the new category text box where there is already a PHP echo?

Thanks.

Sign in to reply to this post

Jason ByrnesWebAssist

the insert behavior will be placed above the doctype tag, you dont need to place the insert, that will happen automatically.

Sign in to reply to this post

ConduciveMammal

Originally Said By: Jason Byrnes
  the insert behavior will be placed above the doctype tag, you dont need to place the insert, that will happen automatically.  



Okay, that's great. Thanks a lot.

One other thing.
Inside the dialog, it says "Store as" under "Save Inserted ID in Session" and the help documentation says "Store as: Specify the name of the session variable that the inserted record data is to be stored in."

What would I put in this? What does it mean by the name of the session variable?

Thanks,
Liam.

Sign in to reply to this post

Jason ByrnesWebAssist

you can enter session name you like.

the ID of the record that is inserted will be saved in a session of the name you specify, this can be used if you are doing an insert to two diferant tables to insert related information

lets say for example you are inserting to an orders and orders details table at the same time.

you would want to relate the order to the order details.

on the insert that saves the order, you could save the ID if the order to a session named orderID

then in the insert that saves the order details, use that session in the detailsOrderId column to relate the 2 records.

Sign in to reply to this post

ConduciveMammal

That's perfect example. Thanks.

I gave it a go and something else happened. On my New Category webpage, I typed in "Test category" and submitted and then went to my database, what it's done, is it's inserted a new record but without the "Test Category" essentially leaving it blank except for the Cat_ID. What did I do wrong this time? I've attached a couple of images of my new record settings and also one of the blank database record that was created.

Thanks so much for your continued help

Sign in to reply to this post

Jason ByrnesWebAssist

the cats name column is bound to a session variable, you should be using the form element.

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