Monday, February 14, 2005

How to Convert a Dataset in to a delimited text file ?

Why ?
Because the contents of a single table, 1800 row dataset weights 2.5MB in XML format, while it weights 500KB in delimited text file...

Again why ?
Because you need to send it over an XML Web Service...

Again why ?
Bacause the SOAP proxy created with Visual Studio .NET 2003 does not support HTTP 1.1 compression...

I will try to figure this out in a clean way...
So far the best resource is brendan tompkins blog .

But seems to be a problem with handling multiple tables.

So long.

1 Comments:

Blogger bl0gg32 said...

Well, did not take that long ...

Does not worth the trouble...

One would ask: Not even for the %80 size reduction ? YES AND YES...

Do this:
Enable compression on IIS6.0 (A challange by itself)
Enable HTTP GET on your web service.
Create the HEAVY-WEIGHT SOAP client proxy, that will help you to get all the types in the web service.
Create a web request (HTTP GET) to the web service.
Add a compression-enabling header to your request.
Get the response.
Check the response for compression.
If compressed, use ICSharpCode.SharpZipLib.dll to decompress it.

You get the XML of the dataset...

When you compress the XML and the text file, the difference in size is neglectible. In my case it was a 10 milliseconds difference on the WAN.

3:36 PM  

Post a Comment

<< Home