Posted on: 12/18/2015 6:52:20 PM | Views : 1130

Hi
 I am getting this error in DAl
Invalid OperationException was unhandled by user code . Additional Information The SelectCommand property has not been initialized before calling 'Fill'.
public DataSet GetData() { _SqlConnection = new SqlConnection(WebConfigurationManager.ConnectionStrings["cnn"].ConnectionString); _SqlConnection.Open(); DataSet ds = new DataSet(); SqlDataAdapter da = new SqlDataAdapter(); ds = SqlHelper.ExecuteDataset(_SqlConnection, "Sp_GetTransporter"); da.Fill(ds, "table1"); return ds; } [WebMethod] public static string GetData() { BAL.Transporter _objectdata = null; _objectdata = new BAL.Transporter(); return _objectdata.GetData().GetXml() ; }
Thanks

Go to the complete details ...