How to create a new table in SQL Server using DataTable

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

Guest

Hello,
Is it possible to write a DataTable to SQL Server.
I would like to create new DataTable with some columns and records. Now I would like to store this DataTable to SQL Server as a new Table.
Can someone let me know if this possible?.
Thanks
 
You'll have to write the DDL Statement in order to do this. There's no
automatic function in ADO.NEt to make a DataTable appear in the db, you'll
have to either walk through it and create the structure based on the
datatable's schema or you'll have to figure it out in advance and fire the
ddl accordingly. http://www.knowdotnet.com/articles/ddl.html

--
W.G. Ryan MVP Windows - Embedded

http://forums.devbuzz.com
http://www.knowdotnet.com/dataaccess.html
http://www.msmvps.com/williamryan/
Rajiv said:
Hello,
Is it possible to write a DataTable to SQL Server.
I would like to create new DataTable with some columns and records. Now I
would like to store this DataTable to SQL Server as a new Table.
 
Back
Top