Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Create SQL table from .net dataset
Message
General information
Forum:
ASP.NET
Category:
ADO.NET
Miscellaneous
Thread ID:
00714206
Message ID:
00714238
Views:
18
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.asp

Once 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.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Reply
Map
View

Click here to load this message in the networking platform