473,503 Members | 12,367 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Updating records and List/menu

2 New Member
:mad: OK. I have been attempting to do this for some time:
Dynamic List/Menu
Dropdiwn with Usernames
Need to update Record Using the Dropdown
Using ASP, VB, And Dreamweaver

Form Code:

<form id="form1" name="form1" method="POST" action="<%=MM_editAction%>">
<p align="center">
<label>Update User<br />
<select name="slUser" id="slUser">
<%
While (NOT RSNames.EOF)
%>
<option value="<%=(RSNames.Fields.Item("UserID").Value)%>" ><%=(RSNames.Fields.Item("Name").Value)%></option>
<%
RSNames.MoveNext()
Wend
If (RSNames.CursorType > 0) Then
RSNames.MoveFirst
Else
RSNames.Requery
End If
%>
</select>
</label>
</p>
<p align="center">
<label>Defense<br />
<input name="txDef" type="text" id="txDef" size="15" />
</label>
</p>
<p align="center">
<input name="hiddenField" type="hidden" value="<%=now%>" />
<label>
<input name="btUpdate" type="submit" id="btUpdate" value="Update" />
</label>
</p>
<input type="hidden" name="MM_update" value="form1">
<input type="hidden" name="MM_recordId" value="<%= RSUpdates.Fields.Item("PlayerID").Value %>">
</form>

Form Will update 1st Record..
Update Record Set up as follows:
Connection/Updates/Record from All OK
IniqueKey-UserID
After Update-Blank
slUser- <ignore>
txDef Updates column "Ulev" (Numeric)
HiddenField Updates column "EditDate" (Date)

If I select slUser to update "UserID" Get error:
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot update identity column 'PlayerID'.

I have been wracking my Brain about this issue..
Thank you for your Time and assistance..
Aug 10 '06 #1
2 3544
sashi
1,754 Recognized Expert Top Contributor
Hi there,

If I select slUser to update "UserID" Get error:
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot update identity column 'PlayerID'.
you cannot update a primary key.. primary keys are meant to be unique.. meaning you cannot have a duplicate record when the field in set to be primary key.. :)
Aug 11 '06 #2
Infopumper
2 New Member
I do understand that. What I am trying to do is:
Update a record using the selection from a List/Menu
I am not attempting to update the Primary key (Although I have tried).
I am trying to get away from needing to go to a second page to update a record.

Any help with this would be most appreciated.
Thank you in advance.
Aug 11 '06 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
1995
by: P | last post by:
Hello, I am having a difficult time updating a record via a stored procedure using the gridview and sqldatasource. I cannot seem to be able to find a way to set everything up so that I can pass...
4
13015
by: fizzyfozzy | last post by:
Hi, I am trying to figure out how to show or hide a selection of divs on my page depending on what is selected from a list/menu item, using css & javascript. I have tried to use the script...
1
2026
by: EyeHawk | last post by:
OK, hopefully somebody can help me out again. My next problem is updating 3 form fields (type list/menu option) that correspond to a date, one for month, one for day and one for year when the user...
4
6484
by: TechnoAtif | last post by:
Hi ALL I have entered some array values using checkboxes into mysql database through a form. Next iam creating a searchpage where all those cateogories inserted through checkboxes has to be...
4
3383
by: jmartmem | last post by:
Greetings, I have an ASP page containing a Record Insertion Form with a number of fields (mostly text fields and list/menu fields) linked to an Access database. I've created an onsubmit behavior...
16
4905
by: stevedude | last post by:
CSS newbie again. I have a problem trying to get coffee mug images within anchor tags to center with my link text for a vertical list menu. If I use the horizontal/vertical properties of...
5
1867
by: jmartmem | last post by:
Greetings, I am using Dreamweaver CS3 to design an ASP page that contains an Insert Record Form. Within this form are two list/menu form fields that I would like to "synchronize". In other words,...
2
2361
by: tamasu | last post by:
Hi, I am retrieving a selected item from a list/menu component on an HTML page. The said value is passed as a parameter to a method initiated through <jsp:useBean. I am aware that when...
0
7212
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7098
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7296
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
7017
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7470
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5604
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5026
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4696
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1524
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.