Solved

Update Record: A very peculiar behavior: Specify value for at least one column?? Submit at least one column as primary key??

Posted on 2004-07-30
15
1,167 Views
Last Modified: 2008-01-09
I just don't get this update record behavior.

Very odd.

First, I used the "insert master detal set" to make two pages. I initially did this showing only ID, name and description fields in the master page, and all table fields in the detail page for a given item.

Then I (somehow, don't ask) added an update record behavior to this detail page. Unfortunately, the detail page only showed the record fields that showed in the detail page were the ID, name and description, and when I updated one description, the record data in all the other fields (except the ID and name) was overwritten in the database as blank.

This was no good, so I redid the master detail set from scratch, summoning all the fields for all the records in the database in the master page, and all the fields in the detail page for the selected record detail.

Now, Dreamweaver (MX 2004) will not allow me to put in the update record behavior. In the update record dialog, I am shown all the fields in the table with a message that "The field does not get a value." And in the value area below, there is no option of giving any value to any field. So whwn I go to "okay," I get two error messages: "Please specify a value for at least one of the columns." and "Please submit at least one column as primary key."

Now, these seem like reasonable requests, but for the life of me I cannot find a way of getting DW to oblige.

Help!

Ideally, I'd like a rock solid, idiot proof, bulleted "how to" list for making an update page.
0
Comment
Question by:stevenjs
15 Comments
 
LVL 8

Expert Comment

by:CoolATIGuy
Comment Utility
Read this: http://www.drdev.net/article01.htm

CoolATIGuy
0
 

Author Comment

by:stevenjs
Comment Utility
Thanks, CoolATIGuy, but I don't want to go to stored procedures.

What I'm trying to do is simple and doesn't require it. I don't mind updating the records one at a time. I'd just like to be able to use the basic update record behavior before I more on to anything more sophisticated. Specifically, what is going on that I cannot insert the behavior?

What am I missing ?


0
 
LVL 8

Expert Comment

by:CoolATIGuy
Comment Utility
Sorry, didn't realize that was too in depth...this more like it:

http://www.dmxzone.com/showDetail.asp?TypeId=2&NewsId=4501

CoolATIGuy
0
 

Author Comment

by:stevenjs
Comment Utility
That's better, but I really need to know why these errors are occurring.

As best I can tell from http://www.dmxzone.com/showDetail.asp?TypeId=2&NewsId=4501&LinkFile=page3.htm, they describe creating a master detail set, then adding the updage record behavior.

The problem is that what this tutorial describes does not happen:

"Our values will come from our form, form1, we'll be using the dmxzone connection and updating the table countries. Because of the way that we named our form fields, Dreamweaver will automatically know that we are updating the record that is selected by the primary key country_pk and that which form field corresponds with which field in the database."

Instead, in the dialog box pictured above the above comment on that tutorial page, each field in the list for the form says "Field does not get a value" and there is no way to specify a value! This is the problem. I do not think it has to do with standard procedures. I think one should be able to add an update record behavior to a detail page, no? The problem is that DW MX 2004 will not allow it??!!

regards,

stevenjs
0
 
LVL 8

Expert Comment

by:CoolATIGuy
Comment Utility
Just to make sure, you are using MySQL, right?

CoolATIGuy
0
 
LVL 8

Expert Comment

by:CoolATIGuy
Comment Utility
I'm just trying to give you what I can, as info on your errors is sparse...try http://www.wdvl.com/Authoring/DynamicDW/dynamic4_1.html

CoolATIGuy
0
 

Author Comment

by:stevenjs
Comment Utility
Thanks, I'm not criticizing. I'm just frustrated!

What is described at http://www.wdvl.com/Authoring/DynamicDW/dynamic4_1.html is what I am attempting to do.

No, I am using ColdFusion MX and a .mdb database, neither of which should make any difference to Dreamweaver.

;-0
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 8

Expert Comment

by:CoolATIGuy
Comment Utility
Ahhh...Access; fun. :-P  Well, I'm at a loss...sorry. :-(

CoolATIGuy
0
 

Author Comment

by:stevenjs
Comment Utility
Actually,  http://www.wdvl.com/Authoring/DynamicDW/dynamic4_1.html seems to be talking about some older version of DW, perhaps even Ultradev. It is a poorly written tutorial, that ultimatelyleaves me more confused than ever.

;-0
0
 
LVL 8

Expert Comment

by:alexhogan
Comment Utility
Updating a recordset is different from inserting a recordset into a database.

When updating a recordset in a database you will need to supply a value to replace.  For instance if you had a table named 'racers' that contained the three fields;
id
firstname
lastname

And you had values in a recordset that were;
id            =   1
firstname =   Bob
lastname =    Slick

But you wanted to have that record contain the values;
id            =   1
firstname =   Tom
lastname =   Slick

You would have an update statement that looks like this;

UPDATE racers
SET firstname       = 'Tom'
WHERE firstname  = 'Bob'
AND lastname       = 'Slick'

This identifies the record that you want updated and will replace the first name Bob with Tom.

Does this help?
0
 

Author Comment

by:stevenjs
Comment Utility
No, but thanks.

Actually, for all the Macromedia help and hither and yon tutorials I've read on this behavior, a few pages in Sam's "Teach Yourself Dreamweaver UltraDev 4" made it all so simple to understand, bye-bye all the errors, up and running.

Since Sam's not an expert here, I'm giving myself the 500 points!

I went back afterwards and re-read Macromedia's help pages and tutorial on this behavior. I just do not believe these people speak English. I believe they want this stuff to be accessible to as few as possible, to make themselves look better. Now, I am a technical writer, so I know a thing or two. Why bother making a programming interface for designers and then leave the help writing to programmers???
0
 
LVL 8

Expert Comment

by:CoolATIGuy
Comment Utility
Before you close it, could you give us the low down on what you did?

CoolATIGuy
0
 

Author Comment

by:stevenjs
Comment Utility
I don't want to re-type the book's sections, but the "low down" is this:

* I created a master/ detail pair of pages using all of the columns in the database.
* I used the detail page as the basis for the update page, as follows:
** I expanded the form to encompass the entire detail table.
** I deleted all the previously defined server behaviors in the server behaviors panel, keeping only the recordset.
** I added text (or other as appropriate) form input fields to each of the appropriate cells of the table.
* I then added the update record behavior from the behavior palette.
* I bound each of the form input fields to the appropriate dynamic field from the "Dynamic Elements and Dynamic Text Field" menu in the sever behavior's palette, or, it is even easier to do the same thing directly from the Properties Inspector.

Voila! Actually, I'm going to save the above for the next time, because it's even more concise and intuitive than Sam's, if I do say so myself.

regards,

stevenjs
 
0
 

Accepted Solution

by:
modulo earned 0 total points
Comment Utility
Closed, 500 points refunded.

modulo
Community Support Moderator
Experts Exchange
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
I still run into .cgi files every now and then. In some instances, I actually prefer the simplicity of a .cgi script to other options. Since I use DreamWeaver extensively, what I needed was a way to open .cgi scripts in Dreamweaver. And I wanted to …
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now