I have a storedProcedure with joining four table . I want to bind the result from different table in a gridview control.
here is my data access layer code
aCommand = new SqlCommand("spViewPatientHistory", aConnection);
aCommand.CommandType = CommandType.StoredProcedure;
aCommand.Parameters.Add("@PatientId", SqlDbType.Int).Value = patientId;
aCommand.Parameters.Add("@FirstName", SqlDbType.VarChar).Value = firstName;
aCommand.Parameters.Add("@LastName", SqlDbType.VarChar).Value = lastName;
aDataAdapter = new SqlDataAdapter(aCommand);
aDataAdapter.Fill(aDataSet);
aConnection.Close();
and this is my business logic code
aHistoryPatientDataTable = aDataAccess.GetSearchPatientHistory(patientId,firstName,lastName);
In business logic it show a error
Cannot convert dataset to dataTable . How to solve it ?