DBNull and empty strings
Posted: Sun 02 Jul 2006 16:00
Hi there,
I have a problem to save my data if there are empty strings in the fields.
1 Step I have an empty field. It is DBNull.
2 Step I insert any value.
3 Step I do an update of these value. (Works fine)
4 Step I clear my table.
5 Step I reload the data.
6 Step I clear the Value, (to '' not to DBNull) and save the data.
7 Step clear my table.
8 Step reload the data.
9 Step change my data to any value
10 Step try to update but every changes will be requested with an error like (German) Parallelitätsverletzung 0 records will be saved.
I get this problem only with the Framework 2.0. With the older one (1.1), everything works very fine.
It seems that the data adapter does not now the difference between a field which is DBNull and a field that contains an empty string (“”)
So it is not possible to change and save a record, which contain an empty string???
An other problem I have is, to reconfigure a Tableadapter which is created by the dataset wizard. Every thing works fine, but on the end of the wizard I get an error like: “The Index will be outside of the Array”
If anybody has a solution or help, I would be very happy to get some information.
Kind regards
Thomas
I have a problem to save my data if there are empty strings in the fields.
1 Step I have an empty field. It is DBNull.
2 Step I insert any value.
3 Step I do an update of these value. (Works fine)
4 Step I clear my table.
5 Step I reload the data.
6 Step I clear the Value, (to '' not to DBNull) and save the data.
7 Step clear my table.
8 Step reload the data.
9 Step change my data to any value
10 Step try to update but every changes will be requested with an error like (German) Parallelitätsverletzung 0 records will be saved.
I get this problem only with the Framework 2.0. With the older one (1.1), everything works very fine.
It seems that the data adapter does not now the difference between a field which is DBNull and a field that contains an empty string (“”)
So it is not possible to change and save a record, which contain an empty string???
An other problem I have is, to reconfigure a Tableadapter which is created by the dataset wizard. Every thing works fine, but on the end of the wizard I get an error like: “The Index will be outside of the Array”
If anybody has a solution or help, I would be very happy to get some information.
Kind regards
Thomas