T
tg.foobar
my setup:
visual studio 2005
sql server 2000
i'm using a dataset (used to be called typed dataset in 2003), where i
use the MSDataSetGenerator to create a class for me based on the scheme
of my SQL server. This schema doesn't include the default values that
are defined in the SQL server. It's setting all the default values to
NULL. is thre an easy way to get around this? for example, i have a
"quantity" (byte) column in the "orders" table with a default value of
5, i would want to see:
mydataset._orders.columns("quantity").quantity.defaultvalue == 5
right now that value is DBNULL.
Yes, i know i can go into the schema and change the default value
there, but if i change hte database and need to regenerate the data set
then i need to change all the default values again. Yes, i know i can
make a wrapper class around the dataset (i actually have one already)
and put in a function that sets all the default values to the ones i
want at creation, but i have lots of tables and lots of columns and
that would be quite tedious. It seems like there should be an easier
way.
visual studio 2005
sql server 2000
i'm using a dataset (used to be called typed dataset in 2003), where i
use the MSDataSetGenerator to create a class for me based on the scheme
of my SQL server. This schema doesn't include the default values that
are defined in the SQL server. It's setting all the default values to
NULL. is thre an easy way to get around this? for example, i have a
"quantity" (byte) column in the "orders" table with a default value of
5, i would want to see:
mydataset._orders.columns("quantity").quantity.defaultvalue == 5
right now that value is DBNULL.
Yes, i know i can go into the schema and change the default value
there, but if i change hte database and need to regenerate the data set
then i need to change all the default values again. Yes, i know i can
make a wrapper class around the dataset (i actually have one already)
and put in a function that sets all the default values to the ones i
want at creation, but i have lots of tables and lots of columns and
that would be quite tedious. It seems like there should be an easier
way.