G
Guest
Hi all,
I'm trying to update an SQL database by allowing users to upload a csv file
via webform. I then want to fill a datagrid to show what changes have been
made.
At first I tried using DataSets Merge, however this sets row states to
modified even if the rows are identical (which I didn't want for several
reasons). I changed the code to check for changes in the row... however when
it checks a decimal value the same value does not match! For example 43.5 in
both but if you look closer the lo value of one is 4350 and the other is 435.
I was converting all the objects ToString for comparison so one goes to
"43.50" and the other "43.5".
I'm not sure why it's doing this?! the scale of the decimal in the DB is 2
however when I create the DataTable to hold the csv data, I get the DataType
for the columns from the DataTable populated from the DB, so it should be the
same.
Does anybody have any suggestions for me?
Thanks
Gav
I'm trying to update an SQL database by allowing users to upload a csv file
via webform. I then want to fill a datagrid to show what changes have been
made.
At first I tried using DataSets Merge, however this sets row states to
modified even if the rows are identical (which I didn't want for several
reasons). I changed the code to check for changes in the row... however when
it checks a decimal value the same value does not match! For example 43.5 in
both but if you look closer the lo value of one is 4350 and the other is 435.
I was converting all the objects ToString for comparison so one goes to
"43.50" and the other "43.5".
I'm not sure why it's doing this?! the scale of the decimal in the DB is 2
however when I create the DataTable to hold the csv data, I get the DataType
for the columns from the DataTable populated from the DB, so it should be the
same.
Does anybody have any suggestions for me?
Thanks
Gav