Return an array with null values
- From: dwischnewski@xxxxxxxxx
- Date: Tue, 11 Mar 2008 02:40:29 -0700 (PDT)
I have the following code (excerpt):
<code> public struct UserAddress
{
public int ID;
public string companyName;
public string address;
public string city;
public string zip;
}
...
[WebMethod]
public List<UserAddress> GetAddresses(int UserID)
{
DbCommand cmd;
DbParameter param;
DbDataReader reader;
int Idx;
...
}</code>
If I have no data, for example for the field "companyName", I want to
return a NULL value (probably by omitting the value node from the
response xml). However, all my attempts to get there, always simply
return an empty node, e.g.: <companyName />.
Is there any way to accomplish this, we need to be able to differ
between empty strings and null values in the database.
Thanks,
Daniel
.
- Follow-Ups:
- Re: Return an array with null values
- From: sakura
- Re: Return an array with null values
- Prev by Date: Re: Deployment Question
- Next by Date: Client is slow processing a response.
- Previous by thread: Deployment Question
- Next by thread: Re: Return an array with null values
- Index(es):
Relevant Pages
|