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

New to ADO2.net

I'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.

Mar 20 '06 #1
2 1158
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."

Mar 21 '06 #2
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.
--
Hope 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-****@online.microsoft.com> wrote in message
news:az**************@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."

Mar 21 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Christopher | last post by:
Hi! I want to write a function or stored procedure such that it will use ADO2.6 or better so I can use the XMLhttpServer. When this function is invoked it will execute a URL and gather the...
2
by: Brian Shearer | last post by:
Hi, can anyone assist... We have developed an application in .NET using ADO2.7 and have discovered that the production platform only has ADO2.5. We are connecting to SQL2000. Can anyone...
1
by: mariantrygg | last post by:
Set qdf = dbs.QueryDefs("qryUpdate_OMNIS_F_ST_Transactions") 'append qdf.Parameters(0) = DMax("STTR_SEQ", "CopyOMNIS_F_ST_Transaction") qdf.Execute dbSeeChanges This gives me an error 3146...
6
by: ItsMe | last post by:
Hi, I want to check whether the record exist or not based on my query, so i'll be using OleDbCommand. What is the best way to check on a huge table ? I used to write like this in VB6.0... ...
2
by: Chenna Sudarsan | last post by:
Hello, I am connecting to Oracle9.2 database from VB6.0 using MSDAORA provider. I am using ADO2.5. When I try to access a blob column of oracle I am getting the below mentioned error. ...
3
by: phonl | last post by:
I am a vb6 ADO developer looking at vb.net 2005 and ADO2.net. I used the vb.net 2005 data wizard to bind some controls to a database. Now I want to run a select query and have the bound controls...
3
by: phonl | last post by:
VB.NET 2005 and ADO2.NET After years of VB6 and ADO coding, I'm checking out ADO2.NET. I spent several hours trying to figure out why the line: objDataAdapter.Update(objDataSet, "myTable") ...
6
by: phonl | last post by:
In ADO2, how would I find the position of "x" in: myDataSet.Tables("myTable").Rows(x).Item("myField") = "NewValue" I want to manipulate some data in the current row in my dataset, but it seems...
7
by: Ross Contino | last post by:
Howdy: I am an experienced VB 6.0 database programmer trying to write first VS 2005 application in VB 2005. I want to create an end user defined query and pass it to the program. Specifically,...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
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...
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: 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)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

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.