O
Ola Ekelund
Hi!
I have a typed dataset which I fill from a select
statement, but some columns in my result my be null. When
I read this null columns in my client with:
dsCustomer.Customer.AgName.ToString();
I get an InvalidCastException. I then tried to set
codegen:nullValue="XX" in the elements in my .xsd file but
this didn't help.
But if I read it like an untyped dataset:
dsCustomer.Tables[0].Rows["AgName"].ToString();
This works. Why does in not work with typed dataset?
Regards
Ola
I have a typed dataset which I fill from a select
statement, but some columns in my result my be null. When
I read this null columns in my client with:
dsCustomer.Customer.AgName.ToString();
I get an InvalidCastException. I then tried to set
codegen:nullValue="XX" in the elements in my .xsd file but
this didn't help.
But if I read it like an untyped dataset:
dsCustomer.Tables[0].Rows["AgName"].ToString();
This works. Why does in not work with typed dataset?
Regards
Ola