Roland,
You can't use the DataAdapter's Update method to create a table on the database. If you want to do it programmatically, you'll need to execute DDL commands, such as CREATE TABLE, ALTER TABLE, etc. Here is a link that shows you how to do this:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskExecutingUpdatesOrDatabaseCommandsUsingDataCommand.aspOnce the table is created in the backend, you should be able to take a manually created datatable, populated with data, and update the backend table with the data as long as the schemas match exactly.
>Hi,
>
>I created a dataset using winform, sqlconn and sqldataAdpater.
>
>The dataset contains columns from different tables.
>
>I want to create a new SQL table in the database.
>
>How do you write/create a new SQL table in the database from the dataset?
>
>Thanks
>Roland
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi