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