[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
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
Medium Priority
?
1,246 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
15 Comments
 
LVL 8

Expert Comment

by:CoolATIGuy
ID: 11682866
Read this: http://www.drdev.net/article01.htm

CoolATIGuy
0
 

Author Comment

by:stevenjs
ID: 11682899
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
ID: 11682936
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
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 

Author Comment

by:stevenjs
ID: 11683003
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
ID: 11683031
Just to make sure, you are using MySQL, right?

CoolATIGuy
0
 
LVL 8

Expert Comment

by:CoolATIGuy
ID: 11683035
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
ID: 11683048
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
 
LVL 8

Expert Comment

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

CoolATIGuy
0
 

Author Comment

by:stevenjs
ID: 11683649
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
ID: 11685434
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
ID: 11685917
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
ID: 11689400
Before you close it, could you give us the low down on what you did?

CoolATIGuy
0
 

Author Comment

by:stevenjs
ID: 11690058
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
ID: 11729541
Closed, 500 points refunded.

modulo
Community Support Moderator
Experts Exchange
0

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Suggested Courses

649 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