Click here to Skip to main content
15,881,882 members

Comments by adityaimmadi (Top 12 by date)

adityaimmadi 24-Oct-13 15:52pm View    
sir,i already tried it before posting the question
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);---at this line i got error in converting nvachar value to it int.thats why i changed above line
DataList1.DataSource = ds;
DataList1.DataBind();
adityaimmadi 24-Oct-13 15:41pm View    
yes sir,it contains some random numbers and letters.what can i do now ,why this happens..
can you please tell me the solution...
Thanks in advance
adityaimmadi 1-Oct-13 14:57pm View    
the value is encoded sir and type is string...
Thanks and Regards
adityaimmadi 1-Oct-13 14:52pm View    
Thanks sir,i'll change it defnetly...
adityaimmadi 1-Oct-13 14:51pm View    
Sir,i have changed my code like this
foreach (var keyValue in SPParamWithValues)
{
cmd.Parameters.Add(keyValue.Key, SqlDbType.Int).Value = keyValue.Value;

}
comd.CommandType = CommandType.StoredProcedure;
comd.Parameters.AddWithValue("@id", id);
using (var da = new SqlDataAdapter(comd))
{
da.Fill(table);
}
}
thenn it says Error converting data type nvarchar to int.in my table id datatype is int ,i spend coulpe of hours for this,can you please helpp me
Thanks and regards