Null values in typed dataset

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top