I'm not really sure how to ask this question because I'm still getting my
feet wet with data access and VB.NET, but here goes:
To start off with, I'm using VB 2005 Express to connect to an Access database.
I have a dataset in which a parameterized query returns the correct result
set in the forms of a tableadapter and a bindingnavigator. In other words, I
can perform my query and see that the tableadapter and bindingnavigator
contain the row(s) of data I expect.
What I want to do is make a decision in my program based on the value in one
of the columns in the tableadapter or bindingnavigator. Here's a short
example:
In my tableadapter and bindingnavigator, I can see the following columns and
values after running my query:
id = 2
partnumber = 12345
itemtype = OPT
Before I display a certain form, I want to know what the value of the
"itemtype" column is so I can customize the information on the form. So, in
pseudocode, I want to do:
If itemtype = 'OPT' Then
aControl.Enabled = TRUE
Else
aControl.Enabled = FALSE
End If
Where I'm stuck is the If itemtype = 'OPT'. How in the world do I find out
what the value is in that column in my tableadapter or bindingnavigator or am
I barking up the entirely wrong tree here?
Thanks in advance for any assistance.
Rich