473,386 Members | 1,733 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,386 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 1694
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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
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
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...

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.