DataTable

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How do I copy the binary data (possibly longer than 8000 bytes) to a
DataTable? What is the syntax to add a column and add data to it like below?

DataTable.Columns.Add("MyBinaryField", ???); (What is the syntax for the 2nd
parameter)

DataRow dr = DataTable.NewRow();
dr["MyBianryField"] = data; (Is this correct if longer than 8000 bytes?)
 
You can use string type. I use that to store file streams... I have had no
problems so far...

VJ
 
vj said:
You can use string type. I use that to store file streams... I have had no
problems so far...

Or I think you can just use an NTEXT on the SQL side, and then a byte[] on
the c# side.

m
VJ

Roy said:
How do I copy the binary data (possibly longer than 8000 bytes) to a
DataTable? What is the syntax to add a column and add data to it like
below?

DataTable.Columns.Add("MyBinaryField", ???); (What is the syntax for the
2nd
parameter)

DataRow dr = DataTable.NewRow();
dr["MyBianryField"] = data; (Is this correct if longer than 8000 bytes?)
 
Hi,

Roy said:
How do I copy the binary data (possibly longer than 8000 bytes) to a
DataTable? What is the syntax to add a column and add data to it like
below?

DataTable.Columns.Add("MyBinaryField", ???); (What is the syntax for the
2nd
parameter)

DataRow dr = DataTable.NewRow();
dr["MyBianryField"] = data; (Is this correct if longer than 8000 bytes?)

you can use simply object


maybe more details could further refine the answer.
 

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

Back
Top