Hi,
I have some data that is coming into me from an Inbound TCP connection. The data is already perfectly layed out as a datatable - it is literally a pipe-delimited table, with columns and rows. Rows are deliminated by newlines, and columns delimited by pipe.
Anyway, once I have this data as an array of byte(), or one big string... How can I quickly insert this into a SQL table using the SqlBulkCopy object It seems that SqlBulkCopy.WriteToServer() only accepts either a datatable or an IDataReader....
My question is, do I really *have* to loop through my string/byte array row for row and convert this to a datatable There's no way to easily shove the string/byte array into the WriteToServer() function (or into a DataTable/IDataReader) It just seems like a shame I have to loop through the entire string row for row when it is already in a datatable-style format.
Thanks for any help.
.NET Development32
|