I have a problem trying to do an Update using a formview. The datasource is
an SQLDatasource connected to a SQL Server database. If I saelect an entry
to edit, all of the correct values for the row are properly displayed. If I
delete the item, that works just fine. But, if I try to do an update, I get
an error in the FormView1_ItemU pdated Sub - the ID field value is "Nothing".
I don't understand how that can be since it properly retrieved that row
based on the ID?
If I Break at the FormView1_ItemU pdated sub I see the following:
1. The data was not updated - looking in the DB shows the old data - I
thought this event fired AFTER the update?
2. Some OldValues and NewValues are correct, others are "Nothing"
3. If I attempt to see the DataKey list using ?Formview1.Data KeyNames I get
"Length=0"
The SQLDataSource Select and Update commands look fine.
Does anyone have any ideas on what is going on here or how to go about
debugging it? It just makes no sense to me.
Wayne
an SQLDatasource connected to a SQL Server database. If I saelect an entry
to edit, all of the correct values for the row are properly displayed. If I
delete the item, that works just fine. But, if I try to do an update, I get
an error in the FormView1_ItemU pdated Sub - the ID field value is "Nothing".
I don't understand how that can be since it properly retrieved that row
based on the ID?
If I Break at the FormView1_ItemU pdated sub I see the following:
1. The data was not updated - looking in the DB shows the old data - I
thought this event fired AFTER the update?
2. Some OldValues and NewValues are correct, others are "Nothing"
3. If I attempt to see the DataKey list using ?Formview1.Data KeyNames I get
"Length=0"
The SQLDataSource Select and Update commands look fine.
Does anyone have any ideas on what is going on here or how to go about
debugging it? It just makes no sense to me.
Wayne