Forums

This topic is locked

Update Record

Posted 17 Jan 2003 18:31:55
1
has voted
17 Jan 2003 18:31:55 Keith Russell posted:
Hi

I have a registration page, getting users details, username,password, address etc.
I have used MX User Authentication , and the Login User server behaviour, on login page.

I have a page that displays the users details dynamically, when they are logged in using MM_Username. (username = session variable mm_username)

Problem, I want the user to be able to update fields in this record, say if they changed address etc.

When I try to implement update record server behaviour, with username as the unique key column, the following message is displayed:


Please choose a unique key from the recordset , or click cancel


Does anyone know what is going on?


I can use first name as unique field (which isn't even unique)


username is setup in sql 7 as primary key for users details.





Edited by - keefruss on 17 Jan 2003 18:32:30

Replies

Replied 17 Jan 2003 19:36:45
17 Jan 2003 19:36:45 asp asp replied:
In SQL7, I would suggest you use a table like ID or userID and then set the table as "INT" then have it auto-number, then select this as your unique Key, and it will work!!! username is not a unique key, more then one person can be called (ex. paul), so it becomes non unique.
Replied 17 Jan 2003 19:36:52
17 Jan 2003 19:36:52 asp asp replied:
In SQL7, I would suggest you use a table like ID or userID and then set the table as "INT" then have it auto-number, then select this as your unique Key, and it will work!!! username is not a unique key, more then one person can be called (ex. paul), so it becomes non unique.
Replied 17 Jan 2003 20:10:15
17 Jan 2003 20:10:15 Keith Russell replied:
Thanks for the response asp, username works. Figured it out, had to put dynamic hidden field of username in form for submit, so update would work

Cheers

Reply to this topic