hello everyone i've written the code below from
vb to C#. but it gives me an error saying it cannot explicitly convert "System.Data.DataRow" to "Busl.tblDocument" ( busl is my dataset and tblDocument is my Table.) An explicit conversion exist(are you missing a cast). It underlines the ds variable where r=ds.tblDocument.Rows.Find(Usr.id);
publicstring Update(Docs Usr)
{
busl.tblDocumentRow r;
Dbconnection cd = newDbconnection();
SqlDataAdapter adp = newSqlDataAdapter("Select * From Account", cd.con);
SqlCommandBuilder cmb = newSqlCommandBuilder(adp);
String msg;
adp.Fill(ds.tblDocument);
r = ds.tblDocument.Rows.Find(Usr.id);
r.Description = Usr.description;
r.Fpath = Usr.filepath;
r.Createdby = Usr.usrC;
r.Datec = Usr.dc;
//for all fields
adp.Update(ds.tblDocument);
ds.AcceptChanges();
msg = "Success";
return msg;
}
thanks in advance