Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with update page and database

Status
Not open for further replies.

jisoo22

Programmer
Joined
Apr 30, 2001
Messages
277
Location
US
Hello people!

I have an update page made with Ultradev but it has one little problem. Whenever I make changes to the record, it gives me an error message sayiing that the field linked to the primary key can't be updated. I know this cannot be updated so I don't even touch it but the page tries it anyway, even with the same record number. Is there any way to make the page leave that field alone? I just want the thing displayed with the record.

Thanks,
Jisoo22
 
WHy not go into the code and delete where it tries to do the update to the primary key field?

Depending on which version of UD you are using you will have to remove it in either two places (UD4) or one. Steve Davis
hey.you@hahaha.com.au
 
I'm running UD4, do you know which places have to be deleted?

Thanks,
Jisoo22
 
Post your code. Live long and make your kids suffer..
 
Also check to see if (1) field names are reserved words (2) the data are matching types (Sumitting as text and field is a data) and (3) the data you are submitting has special characters in it. I jsut had the battle with the reserved word issue and have had the problem of the others. May the force be with you. ************

Caution, dates on calendar are closer then they appear.
 
Insead of man-handling your nice, clean Macromedia code why don't you just not include the Primary Key in the record set (passive voice - word grammar checker would get me for that)?

I believe the MM code only updates the fields you've specified so when you're creating your record set just remove your PK from the list of fields to return. If you don't want to recreate your record set because you have a bunch of stuff hanging off it or something, you can edit it by double-clicking it under 'server behaviours' (I think that's where it is). The dialoge box appears and you can remove your PK.

Ta-da!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top