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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

field evaluation in dataset

Status
Not open for further replies.

JBDev

Programmer
Aug 2, 2002
12
US
help
The user interface prompts for 2 values. The first value is used as the parameter to lookup a particular record in the dataset. Once the correct record is found, I need to compare the second user value entered to another field in the dataset. Here is an example:

Dim strFld1 As String = TextBox1.Text
Dim strFld2 As String = TextBox2.Text
OleDbDataAdapter1.SelectCommand.Parameters("field1").Value = strFld1
DsGetData1.Clear()
OleDbDataAdapter1.Fill(DsGetData1)
If Me.BindingContext(DsGetData1, "myTable").Count = 0 Then
MsgBox("Rec not found. Please try again", MsgBoxStyle.Exclamation, Me.Text)
Else
'now check to see if strFld2 = field2 (from database)
' how to do this?
 
I found the answer to this problem. The first step was to get a better book on ADO.NET. Once I positioned the CurrencyManager to the correct row the rest was simple:

ie: Dim fld2 as string = DsGetData1.myTable(0).Field2
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top