Cannot implicitly convert type sring to string[]...
error ----Cannot implicitly convert type sring to string[]...
Hi,
I am getting above error .
my code is...
string [] fksprd_id;
cmd = new sqlcommand("select id from table1 where name = ' "+txt.text+" ' ",con);
da = new SqlDataAdapter(cmd);
ds = new DataSet();
da.Fill(ds);
cmd.Dispose();
for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
{
fksprd_id =ds.Tables[0].Rows[i][0].ToString();
}
i just want to store id in this array but iot shows error like
Cannot implicitly convert type sring to string[]...
..
Thanks in advance..