|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
New to ADO2.netI'm new to ADO2.net. This must be easy, but how would I do get this value
in ADO2.net? VB6 ADO: msgbox myRecordset!myField In ADO2.net I have a TableAdapter, DataSet, and BindingSource binding data to controls. I want to get the value of "myField" in vb.net 2005 code. Hi phonl,
To get the myField value, you can get from DataSet directly. DataSet is a collection of tables. For example, the myField is in the first table, we can use the following to get the myField value in first row. MessageBox.Show(Dataset1.Tables[0].Rows[0]["myField"]); HTH Kevin Yu ======= "This posting is provided "AS IS" with no warranties, and confers no rights." Dear Phonl,
If you propose is only displaying the data, you may also use dataReader. U may use dataReader1.read and then dataReader1.getValue(column_index) to get the value. -- Show quoteHide quoteHope this help and welcome to reply the testing result. Regards Ken Lin, Kam Hung Founder and VP of Hong Kong .NET User Group(http://HKNetUG.com) MCP, MCP+I, MCDST, MCSA, MCSE(NT4 & win2k), MCSE+I, MCDBA(SQL7 & SQL2K), MCSD(VB6 & .NET), MCAD(.NET) Microsoft Community Star(Hong Kong & Taiwan) Microsoft Most Valuable Professional(.NET since 2003) MCT2004 & 2005 "Kevin Yu [MSFT]" <v-k***@online.microsoft.com> wrote in message news:azgwwrITGHA.6492@TK2MSFTNGXA03.phx.gbl... > Hi phonl, > > To get the myField value, you can get from DataSet directly. DataSet is a > collection of tables. For example, the myField is in the first table, we > can use the following to get the myField value in first row. > > MessageBox.Show(Dataset1.Tables[0].Rows[0]["myField"]); > > HTH > > Kevin Yu > ======= > "This posting is provided "AS IS" with no warranties, and confers no > rights." >
Windows vb.net Datagrid
Windows Thumbnail Control MDI Child Wrong Event Firing Waitable Timers in VB.NET Failure Sending Mail exception with VS 2005 Regular Expressions Problem Microsoft VBScript compilation error '800a0400' Where did this come from: Microsoft\CStoVBConverter\Samples\Smart Client\ Control modifiers Help me to Query,navigate and modify a dataset |
|||||||||||||||||||||||