473,569 Members | 2,557 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_e ditAction%>">
<p align="center">
<label>Update User<br />
<select name="slUser" id="slUser">
<%
While (NOT RSNames.EOF)
%>
<option value="<%=(RSNa mes.Fields.Item ("UserID").Valu e)%>"><%=(RSNam es.Fields.Item( "Name").Value)% ></option>
<%
RSNames.MoveNex t()
Wend
If (RSNames.Cursor Type > 0) Then
RSNames.MoveFir st
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="hiddenFie ld" 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_record Id" value="<%= RSUpdates.Field s.Item("PlayerI D").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 3552
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
2002
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 the applicable fields in the gridview to a sqldatasource which in turn calls a sproc with the appropriate parameters and data. Any ideas? Thanks...
4
13019
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 listed here: http://www.thescripts.com/forum/thread88791.html but have been uable to customise it to my needs and could do with some help. My form is...
1
2037
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 selects a date for a javascript calendar solution. Introduction The reason I don’t want to use a text field, is because the website I’m developing...
4
6488
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 retrieved using list/menu box. When i check only a single checkbox to insert the checked category ,selecting that category through list box gives out the...
4
3386
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 to validate the form but this validates only the text fields. I'm unsure how to similarly validate the list/menu fields; specifically, to create a...
16
4918
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 "background" or "background-image", the positioning only works with specifying pixels. If I specify the vertical position in pixels, the image gets cut-off...
5
1874
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, let's say one list/menu is where the user selects "Program Name" and a second is for selecting "Project Name". If the user makes a selection from the...
2
2369
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 the user selects an item from the list/menu an onChange event is triggered. I have handled this event by a javascript function.
0
7700
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8125
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7676
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7974
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6284
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5513
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
1
2114
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 we have to send another system
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
938
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.