PC Review


Reply
Thread Tools Rate Thread

DataSet WriteXML empty fields /columns

 
 
Milo
Guest
Posts: n/a
 
      8th Apr 2010
Hi all,

I am doing a windows mobile project that uses ASP.NET web services.

Web service returns dataset-s that are pulled from database and later saved
on local mobile storage (write XML). On client (WM 6.1) program loads
dataset (read XML and read XML schema) when needed. User can insert/aappend
new records.

My problem occures when some data fileds are empty... default method
WriteXML, on client side, does not create XML nodes for empty
fields/columns.
Than when you are trying to reference some field value that was empty, you
get exception.

Is there any property or method of DataSet that I could use to save dataset
with all fields/columns regardless if empty or not ?

Reagards,
Milo
 
Reply With Quote
 
 
 
 
Jamal Samedov
Guest
Posts: n/a
 
      27th Apr 2010
Hi Milo,
there was almost the same problem with some differencies:
- it was in VS 2005
- windows XP
- the datasource MS SQL 2005
By reading Image field if it is empty.
The problem was solved by implementation of Binding.Format event.
If the field was referenced by some control then assign to evenet handler
some procedure which should treat the field special way.
The same you can do for other field types.
Regards,

J.N. Samedov,

"Milo" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi all,
>
> I am doing a windows mobile project that uses ASP.NET web services.
>
> Web service returns dataset-s that are pulled from database and later
> saved
> on local mobile storage (write XML). On client (WM 6.1) program loads
> dataset (read XML and read XML schema) when needed. User can
> insert/aappend
> new records.
>
> My problem occures when some data fileds are empty... default method
> WriteXML, on client side, does not create XML nodes for empty
> fields/columns.
> Than when you are trying to reference some field value that was empty, you
> get exception.
>
> Is there any property or method of DataSet that I could use to save
> dataset
> with all fields/columns regardless if empty or not ?
>
> Reagards,
> Milo



 
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
Adding fields/columns to DataSet Cartoper Microsoft C# .NET 1 17th Dec 2007 04:27 PM
DataSet.WriteXml() Steve B. Microsoft Dot NET Framework 4 28th Apr 2006 09:35 AM
How to check to for empty fields in a dataset? =?Utf-8?B?bGFuZW0=?= Microsoft ADO .NET 2 2nd Jun 2005 06:47 PM
How to loop through the fields (columns) of a dataset's table row moondaddy Microsoft ADO .NET 4 18th Jan 2005 03:04 AM
Filling a Dataset and Dataset.WriteXML method.. Serdar C Microsoft C# .NET 3 31st Dec 2004 08:07 AM


Features
 

Advertising
 

Newsgroups
 


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