DataTable (or CSV) into Binary Data

S

stockblaster

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.
 
B

Bruce Barker

yes. just serialize it a memory stream, and write the stream to an image
field. you could also serialize to xml and store in an xml (sql 2005) or
text field.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top