Sirdots
asked on
passing the result of a stored procedure to a datatable
I am running a stored procedure and will like to pass the result to a datatable. How can I achieve this please. The code below here is giving me errors.
Thanks.
private DataTable GetSelectCare()
{
DataTable dtselectCare = null;
try
{
dtselectCare = new DataTable();
occom.CommandText = "DispSelectCare";
occom.CommandType = CommandType.StoredProcedur
dtselectCare = occom.ExecuteNonQuery();
}
catch (Exception ex)
{
MessageBox.Show(ex.Message
}
return dtselectCare;
}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.