![]() |
|
|||||||
| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Questions & Help Needed Post any question regarding Basic4ppc. |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
I’m using a table control to make change in multiple columns and want to update those changes in the database by the click event of a button. The numbers of columns to be changed are arbitrary (some time 2 columns, some time 4 columns are to be changed). The statement to update a single column :
cmd.CommandText = "update table-name set column1 = '"&txtbox1.Text&"' where column2= '"& txtbox2.Text& "';" Then do I have to use as many textboxes as the numbers of columns I want to update? Or there is a way to update the whole table at once without using textboxes? Please give some guideline. Thanks and regards |
|
|||
|
I changed the table's column value directly through a textbox like:
Sub Btnchange_Click If txtfilter.Text="" Then Msgbox("No column to change") Else If Table2.SelectedRow < Table2.RowCount Then Table2.Cell(Table2.SelectedCol,Table2.SelectedRow) = txtfilter.Text End If btnupload.Enabled=true End Sub In this way I can change as many columns as it is required. ... ... ... ... Then can update a single column like: Sub Btnupload_Click cmd.CommandText = "update geo set ed = '"&txtfilter.Text&"'where hpid = '"& txtsearch.Text& "';" cmd.ExecuteNonQuery End Sub But the changes made to other columns are not updated. Thanks for your valuable time. |
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Deleting multiple files at ones | sonavep | Questions & Help Needed | 2 | 04-21-2008 04:00 PM |
| Multiple Listviews | tsteward | Questions & Help Needed | 2 | 04-20-2008 11:16 AM |
| Multiple Instances of an application | Louis | Questions & Help Needed | 1 | 12-23-2007 06:20 AM |
| How to play multiple sounds at once? | justdo | Questions & Help Needed | 2 | 09-24-2007 04:59 AM |
| multiple connections to a sqlite database | Peter | Questions & Help Needed | 5 | 05-13-2007 08:49 AM |