471,319 Members | 1,189 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,319 software developers and data experts.

DataTable (or CSV) into Binary Data

Hello all..
Is it possible to convert a DataTable (i create the DataTable from a
CSV file) into binary data and save it into an sql 2005 table (into
binary field).
After that I want to have the ability to add a row to the beginning of
the to the binary data..
And ability to remove a row..
I searched a lot on the web and it seems i can't find an answer.
if i scheme what i want:
[temp.csv] --->DataTable--> [Binary Data] ---> [SQL]
My question is:
How to save Binary Data into SQL is not a problem. I found many
articles about this.
How to move the temp.csv data to a DataTable is not a problem also..
But how to convert the DataTable file into Binary Data is the problem
and how to modify/read the data if needed.. (Usually needed only Delete

and Insert 1 row) .. Read is simply reading all the rows.
Hope someone have an idea about this issue.

Jan 27 '06 #1
3 6701
in .NET Framework 2.0, the DataSet offers a binary Serialization option, and
you can pass it into a BinaryFormatter and get back an array of bytes.
In the 1.0 Framework, you would need to use a DataSetSurrogate class to
"Flatten out" the dataset to binary serializable things like arraylists, as
the 1.0 DataSet can only describe itself to serializers in XML - which
results in a huge amount of data to store.

Search on "Compressed DataSet" to see some stuff on this.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"st**********@gmail.com" wrote:
Hello all..
Is it possible to convert a DataTable (i create the DataTable from a
CSV file) into binary data and save it into an sql 2005 table (into
binary field).
After that I want to have the ability to add a row to the beginning of
the to the binary data..
And ability to remove a row..
I searched a lot on the web and it seems i can't find an answer.
if i scheme what i want:
[temp.csv] --->DataTable--> [Binary Data] ---> [SQL]
My question is:
How to save Binary Data into SQL is not a problem. I found many
articles about this.
How to move the temp.csv data to a DataTable is not a problem also..
But how to convert the DataTable file into Binary Data is the problem
and how to modify/read the data if needed.. (Usually needed only Delete

and Insert 1 row) .. Read is simply reading all the rows.
Hope someone have an idea about this issue.

Jan 27 '06 #2
Hello

I am using ASP.NET 2.0... I will check Compressed DataSet on the web ,
i hope this is what i need.

Thanks for taking the time to reply me.

Jan 27 '06 #3
Hello

I have read about the Compressed DataSet. If i use this method i will
be able to compress the DataSet into an Binary format and save it on my
sql data base on a binary field.. But if i wish to Add new row to that
binary format? i will have to convert it to DataSet --> add new line
--> pass back to binary format --> save in sql database?

Jan 27 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Ferran Foz | last post: by
9 posts views Thread by Maurizio Penna | last post: by
1 post views Thread by Niko Korhonen | last post: by
3 posts views Thread by Randy | last post: by
6 posts views Thread by | last post: by
reply views Thread by Wescotte | last post: by
1 post views Thread by stockblaster | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.