public DataSet IU_Testimonials(int id,string Table,string AName,string Designation,string Description,string Images)
{
SqlConnection con = new SqlConnection();
DataSet ds = new DataSet();
try
{
LocalConnection_class(con);
SqlCommand scmd = new SqlCommand("IU_Testimonials", con);
scmd.CommandType = CommandType.StoredProcedure;
scmd.Parameters.Add("@Id", SqlDbType.Int).Value = id;
scmd.Parameters.Add("@TableName", SqlDbType.NVarChar, 1000).Value = Table;
scmd.Parameters.Add("@AuthorName", SqlDbType.NVarChar, 100).Value = AName;
scmd.Parameters.Add("@Designation", SqlDbType.NVarChar, 100).Value = Designation;
scmd.Parameters.Add("@Description", SqlDbType.NVarChar, 1000).Value = Description;
scmd.Parameters.Add("@Images", SqlDbType.NVarChar, 500).Value = Images;
SqlDataAdapter da = new SqlDataAdapter(cmd);
da.Fill(ds);
return ds;
}
catch
{
return ds;
}
}
while Running about Code i got an error(Fill: SelectCommand.Connection property has not been initial)
Am Using SP For Inserting Records


Praveen SreeramRank #134 · 16.8K reputationPosted Jun 16, 2016, 12:51 AM EDT
Riddhi ValechaRank #794 · 2.9K reputationPosted Jun 16, 2016, 12:55 AM EDT
Sudheer Vasam55 reputationPosted Jun 16, 2016, 1:52 AM EDT
Praveen Kumar Sreeram
Riddhi Valecha
Praveen SreeramRank #134 · 16.8K reputationPosted Jun 16, 2016, 1:59 AM EDT