Hi
my scenario is
i get the data by datareader and load it into a datatable by dt.load(dr) and i put this thable in
a dataset and make it a datasource to a bindingsource and bind this bindingsource to the controls
then i execute sql statements to insert and update since im in connected mode
and my problem is
1- i click on add button which ahs code like:
then write my data and click on update button which execute update statement successfully !! and
then click on delete button which has code like:
it gives me error message says"There is no Original data to access." and also if i use current
version of the row says "There is no Current data to access." !!!
i need help to delete this row from the database how?
thanks in advance.
my scenario is
i get the data by datareader and load it into a datatable by dt.load(dr) and i put this thable in
a dataset and make it a datasource to a bindingsource and bind this bindingsource to the controls
then i execute sql statements to insert and update since im in connected mode
and my problem is
1- i click on add button which ahs code like:
VB.NET:
bs.endedit()
bs.addnew()
then write my data and click on update button which execute update statement successfully !! and
then click on delete button which has code like:
VB.NET:
dim x as string=""
x=ctype(bs.item(bs.position),datarowview).row.item("name",DataRowVersion.Original)
mm.executeNonQuery("delete from mytable where name='" & x &"'")
bs.removeCurrent()
it gives me error message says"There is no Original data to access." and also if i use current
version of the row says "There is no Current data to access." !!!
i need help to delete this row from the database how?
thanks in advance.