create datatable from array of objects?

M

Miha Markic [MVP C#]

You have to crete the table manually (perhaps by inspecing first row's
column types), but you can import data easily using DataTable.Rows.Add and
passing object array for a row at a time.
 
H

hazz

Thank you Miha! I could see the DataTable.Rows.Add requirement. I will
figure out now to create the table manually. -hazz

Miha Markic said:
You have to crete the table manually (perhaps by inspecing first row's
column types), but you can import data easily using DataTable.Rows.Add and
passing object array for a row at a time.

--
Miha Markic [MVP C#]
RightHand .NET consulting & development www.rthand.com
Blog: http://cs.rthand.com/blogs/blog_with_righthand/

hazz said:
How can I do that?
Thank you.
-hazz
 
H

hazz

Thank you Cor. The link was very helpful.
And I will pay close attention to my array/column value correspondence.
thanks again.
- Hazz
 

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