Can anyone tell me what's wrong with the following code. When it gets to the line of code
grdStations.DataSource = taStations.GetData(1) I get a run time error for a "login failure for User5" . The tableadapter is a call to a stored procedure, and User5 has permissions to execute the procedure. Any help would be appreciated.
Thanks
Tom
Private Sub LoadStationGrid()
Dim taStations As New stationsTableAdapters.GetStationsByDeptTableAdapter
Dim dsTrucks As New stationsTableAdapters.TruckTableAdapter
grdStations.DataSource = taStations.GetData(1)
Dim template As GridViewTemplate = New GridViewTemplate
template.DataSource = dsTrucks.GetData()
grdStations.MasterGridViewTemplate.ChildGridViewTemplates.Add(template)
Dim relation As GridViewRelation = New GridViewRelation(grdStations.MasterGridViewTemplate)
relation.ChildTemplate = template
relation.RelationName = "StationTrucks"
relation.ParentColumnNames.Add("sID")
relation.ChildColumnNames.Add("StationID")
grdStations.Relations.Add(relation)
End Sub
grdStations.DataSource = taStations.GetData(1) I get a run time error for a "login failure for User5" . The tableadapter is a call to a stored procedure, and User5 has permissions to execute the procedure. Any help would be appreciated.
Thanks
Tom
Private Sub LoadStationGrid()
Dim taStations As New stationsTableAdapters.GetStationsByDeptTableAdapter
Dim dsTrucks As New stationsTableAdapters.TruckTableAdapter
grdStations.DataSource = taStations.GetData(1)
Dim template As GridViewTemplate = New GridViewTemplate
template.DataSource = dsTrucks.GetData()
grdStations.MasterGridViewTemplate.ChildGridViewTemplates.Add(template)
Dim relation As GridViewRelation = New GridViewRelation(grdStations.MasterGridViewTemplate)
relation.ChildTemplate = template
relation.RelationName = "StationTrucks"
relation.ParentColumnNames.Add("sID")
relation.ChildColumnNames.Add("StationID")
grdStations.Relations.Add(relation)
End Sub