Getting field value from a dataset

flann

Member
Joined
Jun 8, 2005
Messages
20
Programming Experience
Beginner
I'm trying to put the value of a field into a variable where a parameter is met. see code below

Me.SqlDataAdapter1.SelectCommand.Parameters("@PEmailAddress").Value() = strEmail
Me.SqlDataAdapter1.Fill(DsLeads1.ClientInfo)


If DsLeads1.ClientInfo.Rows.Count = 0 Then
dup = False
Else
strAnalyst = Me.SqlDataAdapter1.SelectCommand.Parameters("@analystid").Value
dup = True
End If

when the email address is already in the database, I set duplicate equal to true. I also need to reach back into the dataset and get the analyst field for that same row, where the email addresses are the same.

The code in red is my failed attempt to put that value into a variable, can anybody explain to me what I'm doing wrong?

thanks
 
Back
Top