473,396 Members | 1,929 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.

save rows of a value into database

datagrid ex.
a 1 checkbox
b 2 checkbox
c 3 checkbox

once a user selects these 3 rows from a datagrid and i
want to save the 1, 2, 3 value into the database how do i
do this?

I know how to determine the checkboxes and save data into
the database, but how do i pass the values into my sql
statement?? array??? how?

Thank you in advance.
Jul 21 '05 #1
2 1695
you did not mention, what is the datasource for the datagrid.

If I assume you are using dataset as a datasource of the datagrid, you can
pass values by parameters or insert/update sql statement of the dataadapter.

Rajesh Patel

"Angie" <an*******@discussions.microsoft.com> wrote in message
news:1e****************************@phx.gbl...
datagrid ex.
a 1 checkbox
b 2 checkbox
c 3 checkbox

once a user selects these 3 rows from a datagrid and i
want to save the 1, 2, 3 value into the database how do i
do this?

I know how to determine the checkboxes and save data into
the database, but how do i pass the values into my sql
statement?? array??? how?

Thank you in advance.

Jul 21 '05 #2
Thanks, Rajesh.

My datasource is a select statement against a table in
the db. I just didn't know how to store all the values
and be able to insert each one and figured that looping
through a sql statement would be a bad performance choice.

So is using the dataadapter with a dataset the best way
in your mind? I hope I make sense.

Thanks!!!!
-----Original Message-----
you did not mention, what is the datasource for the datagrid.
If I assume you are using dataset as a datasource of the datagrid, you canpass values by parameters or insert/update sql statement of the dataadapter.
Rajesh Patel

"Angie" <an*******@discussions.microsoft.com> wrote in messagenews:1e****************************@phx.gbl...
datagrid ex.
a 1 checkbox
b 2 checkbox
c 3 checkbox

once a user selects these 3 rows from a datagrid and i
want to save the 1, 2, 3 value into the database how do i do this?

I know how to determine the checkboxes and save data into the database, but how do i pass the values into my sql
statement?? array??? how?

Thank you in advance.

.

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Alpha | last post by:
Hi, I have a window based program. One of the form has several textboxes and a datagrid. The textboxes are bind to the same dataset table as the datagrid and the text changes to reflect different...
0
by: vinod babu via .NET 247 | last post by:
(Type your message here) -------------------------------- From: vinod babu Here my adding a new row code Private Sub cmdadd1_Click(ByVal sender As System.Object, ByVal e As...
2
by: Angie | last post by:
datagrid ex. a 1 checkbox b 2 checkbox c 3 checkbox once a user selects these 3 rows from a datagrid and i want to save the 1, 2, 3 value into the database how do i do this? I know...
1
by: ankz | last post by:
Hi Guys I have got 3 tables - in Access Database with Student ID as primary Key in all and all tables are linked with 1 to 1 relationship. I have code the everying with manual program to...
4
by: anilareddy | last post by:
Hi all, I have a problem in my project. I have developed a small page like this. Now after the save button is clicked, the data which is entered should be stored in the database. I'm attaching the...
7
by: shantanu | last post by:
Hi all i am trying to save a excel file as a tab delimited text file. can i do it some how? i using the code _sheet1.SaveAs(@"C:\PRP \PRPTemp.txt",Excel.XlFileFormat.xlTextWindows...
1
by: =?Utf-8?B?U2hhdw==?= | last post by:
I have a small GridView about max 10 rows and few columns. The columns are simple just a checkbox and a textbox and a bound name. The users don’t want to click “edit” button to edit and...
2
by: chike_oji | last post by:
Please can someone help me. I am writing a web application, that allows for the upload of an excel sheet into the database. I have an upload button and a save button. The upload button allows...
5
by: aashishn86 | last post by:
hi i am using this code for adding /deleting rows dynamically : function addRow() { var tbl = document.getElementById('applications'); var lastRow = tbl.rows.length; // if there's no...
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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,...
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
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 projectplanning, 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.