A
Andrew
In a Typed Dataset, is there a way on the xs:keyref tag that I can specify
how to handle null child objects?
For example, if I have an Invoice table, where a ClientID key is used to
create a reference to a Clients Table by it's ID Column. On the Clients
table I have a Name element.
In the calling code I do :
x = myInvoice.Reference
x = myInvoice.Amount
x = myInvoice.Rate
x = myInvoice.Client.Name
this will throw an error if, for whatever reason, the Client does not exist.
How can I get it to return an empty string instead of having to do :
If Not myInvoice.Client = Nothing Then
x = myInvoice.Client.Name
else
x = ""
End If
how to handle null child objects?
For example, if I have an Invoice table, where a ClientID key is used to
create a reference to a Clients Table by it's ID Column. On the Clients
table I have a Name element.
In the calling code I do :
x = myInvoice.Reference
x = myInvoice.Amount
x = myInvoice.Rate
x = myInvoice.Client.Name
this will throw an error if, for whatever reason, the Client does not exist.
How can I get it to return an empty string instead of having to do :
If Not myInvoice.Client = Nothing Then
x = myInvoice.Client.Name
else
x = ""
End If