Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to pull data from 1 field only in mdb 1

Status
Not open for further replies.

pinkwho

Programmer
May 7, 2002
10
0
0
US
I have a mdb and want to pass various (one at a time) fields to a tooltip. For example, in one column there is the name of a s/w manufacturer. I want to pass that to a tooltip saying either only the url, or something to the effect of "Click here to reach
I built the project using an Oledbadapter, Access 2003 DB, OleConnection and a dataset.

Could someone help me? I just need to know how to pull a single field.

In VB6 when I would use a dataset it was easy.... (dataset1.recordset.field(x) (where x in an integer)).

But it seems .NET is a whole new ball game.

I have tried things such as (SW_data1.Software_Info.Columns(x))

Any help is appreciated
 
Code:
'Loop through all rows (records):
For Each r as DataRow In dataset1.Tables("TableName").Rows
    'Loop through all collumns (fields)
    For Each c As DataColumn In dataset1.Tables("TableName").Columns
       Show each field's value
       MsgBox(r(c.ColumnName).ToString)
    Next
Next

Regards.
 
Hmmm... Ok, I understand looping through all rows/columns. But Why. I want to pull one field (one "cell" if you like). I just need a way to pick out the field, whether it's by an integer or whatever...
 
Sorry if I didn't understand the question correctly.
Converting the VB code:
dataset1.recordset.field(x)
Code:
'This will get the value of the first row (0) and the x column in the datatable
dataset1.Tables("TableName").Rows(0)(x)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top