close ad
Install the LAtest Updates to Work with CC 2017 and CC 2018
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

Update record function is setting recordID field to 0

Thread began 9/12/2013 9:07 pm by evansg7124312885 | Last modified 9/13/2013 9:56 am by Jason Byrnes | 236 views | 1 replies |

evansg7124312885

Update record function is setting recordID field to 0

I fixed this problem by removing the wizard generated binding from RecordID and leaving it blank in the Update Record server behavior, but thought this may be worth sharing and would like to know if this is the appropriate solution.

I built all pages (insert, update, delete, search, and results) using data bridge wizard. I went through and made the adjustments for menus, images to get the desired look and tested page. I am a little puzzled by what I saw from here forward. I used the free database provided by WebAssist and made a few adjustments to the Products table, mostly adding fields. I manually added a few records on the testing server with known values and then used the insert page to test function; all was well here.

The records that I updated did update the fields that I tested with the Update page, but when update was clicked, the next page to appear said that the record was removed (the show if behavior on the detail page). When browsing the affected table, what had happened was all fields that I tested did update, but the one that I did not set able to edit was the recordID field, this is an auto increment field and would display the text only. This record was set to 0 instead of retaining the record number that I was editing (2). The record did not delete, I was able to go in and reset it's value to 2 and it would show up in search and all appeared normal from there.

After playing around with the update server behavior, setting it to the hidden field value, the recordset value, and then just taking all bindings away from this field; I did get the expected results when the update record page was used and the update to record showed on the next page.

A couple questions that also popped up were how was the RecordID field edited, this one is primary and set to auto increment; I would have expected an error to occur rather than allowing an edit to the value. What did I miss in the settings? I do not recall changing anything in the database from WebAssist (this does not mean that I did not).

Like I said, I have this function working as I would expect it to, but I would like a confirmation that this will not have consequences down the road as this table will be a major player in others that depend on it. I also wanted to let you know as this may be a question to visit in your future updates.

Thanks,

Sign in to reply to this post

Jason ByrnesWebAssist

The Primary key field should not be added to the insert and update pages and should be changed by the update, your solution of unbinding it on the update page is correct, I suspect that you had it included on the update page and that is why the binding was added

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