D
dwischnewski
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
<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