I've got a problem with a dataset i'm using
basically i have a c# program which refers to a dataset which is read from and written to an xml file
all works fine for recalling, storing and overwriting data
however
when i try to do one of two things, sorting by an integer column, or averaging an integer column, it all goes pear shaped
for the sort it appears to be handling them as strings, i.e. it sorts 600 above 3000 because the first character is higher
it becomes more apparent that this is what it's trying to do when i try to use the compute(avg) function and it fails because it says it's invalid to use the mean() function on objects of type string
the datatypes are all set correctly in my schema, and when i pull them out individually they are fine and come out as integers, so why when i use these two functions of the dataset does it decide to use them as strings?
any ideas on how to make this work would be much appreciated, obviously i could write my own sort and average methods as it pulls the data correctly individually but i would rather not
basically i have a c# program which refers to a dataset which is read from and written to an xml file
all works fine for recalling, storing and overwriting data
however
when i try to do one of two things, sorting by an integer column, or averaging an integer column, it all goes pear shaped
for the sort it appears to be handling them as strings, i.e. it sorts 600 above 3000 because the first character is higher
it becomes more apparent that this is what it's trying to do when i try to use the compute(avg) function and it fails because it says it's invalid to use the mean() function on objects of type string
the datatypes are all set correctly in my schema, and when i pull them out individually they are fine and come out as integers, so why when i use these two functions of the dataset does it decide to use them as strings?
any ideas on how to make this work would be much appreciated, obviously i could write my own sort and average methods as it pulls the data correctly individually but i would rather not