473,321 Members | 1,916 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,321 software developers and data experts.

Selecting all the rows from the datagrid and update...

111 100+
hii..

i have arequirement where... i want to update a field to N for the rows that are present in the datagrid...

1)

strSQL = "UPDATE tbl_worker_profile SET " & _
"wo_live_status='Y' "

if i run this query.... all the records in the database are updated to Y...

but i want only the ones tht are in teh datagrid...


2)

strSQL = "UPDATE tbl_worker_profile SET wo_live_status='Y' Where wo_worker_code =?WCode "

cmSQL.Parameters.Add("?WCode", myData.Tables(0).Rows(dgWorkersData.CurrentRowInde x).ItemArray(0).ToString())



if i run this query... only the 1st row is updated...

how to update all the rows...???


plz help..

thnx...
Aug 28 '07 #1
0 955

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

Similar topics

6
by: aaa | last post by:
Hi I am trying to create a read-only DataGrid that would always have current row selected. Currently, I am using method: public void SelectDataGridRow(DataGrid dg) { if (dg.CurrentRowIndex >...
6
by: aaj | last post by:
Hi all I use a data adapter to read numerous tables in to a dataset. The dataset holds tables which in turn holds full details of the records i.e. keys, extra colums etc.. In some cases I...
1
by: Jay | last post by:
Hi All, My users are complaining about the page refreshing when they are selecting multiple rows in a datagrid. Has anyone tried to manage this using javascript? I tried smartnavigation but that...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
1
by: Bob Morvay | last post by:
This should be simple but I am stuck. I am trying to read all the rows of my datagrid across all the pages. I can read all the rows on the page that I am on but I can't seem to figure out how to...
1
by: Bob Loveshade | last post by:
I am looking for an example that shows how to select and highlight multiple rows in a DataGrid. My DataGrid is part of a Web User Control which is contained in an ASPX page. I haven't been...
14
by: Sueffel | last post by:
Okay, I have the following scenerio: Protected Sub DelRows() Dim rw As DataRow Dim rrw As DataRow Dim DT as DataTable Dim rws() as DataRow For each rw in ds.Tables("Table1").Rows rws =...
2
by: Tymbow | last post by:
I'm building a web application that is analogous to the Windows XP file explorer in function. The left column contains a TreeView, and the right column a DataGrid populated by selecting TreeView...
2
by: ewingate | last post by:
I have a form with two text boxes, a button, and a datagrid control which is bound to my SQL DB. There are two columns on the datagrid, one for each of the textboxes on the form. I have already...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.