473,396 Members | 1,938 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Checkboxes not update in asp database

I have a list of checkboxes like 1,2,3,4,5 when I use update statement I get 1 instead of 1,2,3,4,5 in my database column. I have checked to make sure request.form is returning 1,2,3,4,5 and it is but it only update one value instead of the array of numbers. Is there a simple way to get this to update correctly? Thanks for your help in advance.
Oct 17 '12 #1
4 1877
Rabbit
12,516 Expert Mod 8TB
It would help to see your code.
Oct 17 '12 #2
Update statement

Expand|Select|Wrap|Line Numbers
  1. NMGroups = Request.Form("NMGroups")
  2.  
  3. strSQL = "UPDATE NewsletterMembers set NMGroups = '" & NMGroups & "' WHERE NMID =" & NMID
  4.  
checkboxes are all name NMGroups with value of 1,2,3,4 etc

I just need the array of numbers to update to one table called NMGroups in my database. Right now it works in my insert statement but when I us the update statement it only grabs the first number in the array. How do I grad all numbers like 1,2,3,4 and save it.
Oct 17 '12 #3
Rabbit
12,516 Expert Mod 8TB
Append the different elements into one string. But I don't recommend doing this. It will work but your data will be denormalized and make future querying more difficult.
Oct 18 '12 #4
fixed it I forgot to remove the whitespace used replace(request.form("NMGroups"), " ", "") 1, 2, 3, 4 almost looks like1,2,3,4 when I did the response.write to verify the form.
Oct 19 '12 #5

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

Similar topics

2
by: tamimi | last post by:
I have a guestbook form that inserts the fields into an Access Database. The database is residing in the "fpdb" folder that was created by FrontPage. The ASP page that writes the data into the...
1
by: Fie Fie Niles | last post by:
I have IIS installed on XP Professional workstation machine. I have an ASP page that open connection to an Access database, then when trying to update the database, it gave me the error "cannot...
1
by: Darn | last post by:
Hi all How do i solve this problem. I'm web developer from Malaysia, the problem occurs when i ftp an Access database which i'm using for this particular web site for it's database.The form...
0
by: PaulB | last post by:
Hi there, Allthough I searched for previous posts, I was unable to solve my problem. I try to link my front-mdb with an Excel file using the next line DoCmd.TransferSpreadsheet acLink, 8,...
5
by: Leanne | last post by:
I am doing customization for Microsoft Pos. I am working on installation package now. I added some new tables and stored procuedures and generated SQL Script for that. During the installation...
0
by: tom | last post by:
When I try to read in a csv file it gives me this error message. 'Cannot update. Database or object is read-only.' If I change the extension to txt it processes just fine. I have googled all...
4
by: Rohith | last post by:
I m not able to update Database through DataGrid.I am working in VB.Net .I can retrieve the Data but could not update the data through datagrid.Please help me.
6
by: Tark Siala | last post by:
hi i'm using VS.NET 2005 +SP1 C#, and i connect access database by ADO.NET 2.0. i'm using Dataset to (insert,update,delete) and in get data i use (Datareader), but my problem when i do this: 1 -...
1
by: adsaca | last post by:
here's my code in filling a datagridview,which i retrieve from database mysql, dim sql as String sql = "SELECT * FROM table_user" Dim myData As New DataTable ...
1
by: sweetjos | last post by:
Thank you sir, I have another question.... Recently I got this error. Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80004005) Cannot update. Database or object is read-only....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
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
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...
0
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
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
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,...

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.