|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Change/assign a value to datasetHi all,
Would anyone tell me how to change a value of a column in a dataset? Something like this: ds.Tables(0).Rows(0)("Column1") = 1 Tia, Roy ds.Tables(0).Rows(0)(0) = 1
Show quoteHide quote "Roy" <R**@discussions.microsoft.com> wrote in message news:0713F209-B628-4405-A5B3-9080D552A602@microsoft.com... > Hi all, > Would anyone tell me how to change a value of a column in a dataset? > Something like this: > > ds.Tables(0).Rows(0)("Column1") = 1 > > Tia, > Roy Hi Scott,
But what happens if ds doesn't have any records in its table. How can I add a blank row and then update the columns values with my default values? Thanks again Show quoteHide quote "Scott Swigart [MVP]" wrote: > ds.Tables(0).Rows(0)(0) = 1 > > > -- > Scott Swigart - MVP > http://blog.swigartconsulting.com > > "Roy" <R**@discussions.microsoft.com> wrote in message > news:0713F209-B628-4405-A5B3-9080D552A602@microsoft.com... > > Hi all, > > Would anyone tell me how to change a value of a column in a dataset? > > Something like this: > > > > ds.Tables(0).Rows(0)("Column1") = 1 > > > > Tia, > > Roy > > > Roy,
Strange I thought that I had sent you an answer. > It was like this.> ds.Tables(0).Rows(0)("Column1") = 1 > This will set in the Item "Column1" from the first datarow from the first Table when that is an integer field an 1. Because that I saw your next question on which are probably hundred answers, one of them. \\\ ds.Tables(0).Rows.Add(ds.Tables(0).NewRow) /// I hope this helps, Cor
TextChanged
stringbuilder replace doesn't work on vbLf , vbCrLf , vbCr Regular Expression to Parse HTML Sending Mail using dotNET Excel Reports in VB.NET Opening and Closing a form error : Cannot access a disposed object named "frmImage". sending bytes openfiledialog control locks folder DATAGRID+SQL: INSERT - works, but SELECT - not :-( Any similar comment line like ' TODO : |
|||||||||||||||||||||||