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

Help with a nested Datalist

Status
Not open for further replies.

sthmpsn1

MIS
Sep 26, 2001
456
US
I am trying to create Nested Datalist and it doesn't like my relation statement. Any help would be great. Visual Studio tells me that "Override Resolution failed because no accessible add can be called with these arguments.

selectCMD1 = New SqlCommand()
selectCMD1.CommandText = "Select * from medicalreimb where loginID = '" & employee.SelectedItem.Value & "' and theyear = '2003'"
selectCMD1.Connection = dbconn
selectCMD1.CommandTimeout = 30
dbconn.Open()
Dim empDA As SqlDataAdapter = New SqlDataAdapter()
empDA.SelectCommand = selectCMD1
Dim empDS As DataSet = New DataSet()
empDA.Fill(empDS, "medicalreimb")
dbconn.Close()
empDS.Relations.Add("myrelation", empDS.Tables("medicalreimb").Columns("loginID"))
medicaldata.DataSource = empDS.Tables("medicalreimb")
medicaldata.DataBind()
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top