PC Review


Reply
Thread Tools Rate Thread

XML and Nulls

 
 
Matt Tapia
Guest
Posts: n/a
 
      9th Sep 2004
I have a table with 3 columns (CustomerID, CustomerFirstName,
CustomerLastName). I select the one row from that table and put it into a
dataset then write an XML file. However, the CustomerFirstName value is NULL
and it did not write a <CustomerFirstName> tag to the XML file.

I then take the XML file to another application that reads it into a
dataset. I remove the one row from the dataset then create a new datarow
that specifices what the CustomerFirstName. However because the
<CustomerFirstName> tag to the XML file was not in the XML file, it will not
allow be to add it the XML file. What can I do?


 
Reply With Quote
 
 
 
 
ciroque
Guest
Posts: n/a
 
      10th Sep 2004
Matt,

In your SQL statement use

COALESCE( CustomerFirstName, '' ) AS CustomerFirstName

to retrieve that column (or any columns that could potentially be
NULL).

This will return an empty string where NULL's exist and allow the
element to be written to the XML file.

Steve

 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Count Nulls & Not Nulls in Reports RoadKill Microsoft Access Reports 2 28th Jul 2008 07:16 PM
Help with nulls, Nz, etc =?Utf-8?B?YnI1NDk=?= Microsoft Access Queries 5 2nd Feb 2007 03:16 AM
nulls =?Utf-8?B?ZGxiMTIyOA==?= Microsoft Access Queries 4 17th Apr 2006 10:01 PM
Help with Nulls =?Utf-8?B?QkQ=?= Microsoft Access Queries 5 2nd Nov 2004 09:07 AM
Getting Rid of the Nulls Drew Microsoft C# .NET 9 20th Apr 2004 09:59 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:46 PM.