DataSet Tables to SQL Server Database

Hi all

For example: I have a DataSet with two tables
and one relation between each other.

Is there a direct way to publish this tables
to the SQL Server even when the tables
dont exists ?
I know, using SqlDataAdapter, it is possible
to update/insert/delete data. But for
this, the table has to exists ... 

Thanks for any help !

Best regards
Frank Uray
0
Utf
1/27/2010 12:40:01 PM
dotnet.languages.csharp 1931 articles. 0 followers. Follow

1 Replies
945 Views

Similar Articles

[PageSpeed] 19

"Frank Uray" <FrankUray@discussions.microsoft.com> wrote in message 
news:0A7EDBBE-91D3-41A7-98E8-99EA7F22B1BB@microsoft.com...
> For example: I have a DataSet with two tables
> and one relation between each other.
>
> Is there a direct way to publish this tables
> to the SQL Server even when the tables
> dont exists ?

     No, there is no "direct" way in ADO.NET to create the tables on the 
server. You would have to build a "CREATE TABLE ..." statement, and then 
submit it to the server by means of a SqlCommand and  ExecuteNonQuery().

> I know, using SqlDataAdapter, it is possible
> to update/insert/delete data. But for
> this, the table has to exists ...

    Once the table exists (because you sent the CREATE TABLE), the best way 
to populate it from a DataTable is to use a SqlBulkCopy object. This is 
faster than a SqlDataAdapter, and also easier to configure if you are 
building your dataadapter from scratch.


0
Alberto
1/28/2010 7:28:31 AM
Reply:

Similar Artilces:

New Server for Small Hospital
Hi, I have a Windows 2000 server running one Domain, AD, Exchange 2000. We just ordered a new Windows 2003 server which I want to replace the old server with for all those jobs and leave the old server as a back up. How do I replicate the AD and Exchange folders to the new server? We only have about 80 users, should I run all these services from the same server or let the old server run DNS and filesharing etc.? I have a 250 GIG External HD I can use to exmerge. Thanks -- Tim Branch Covenant Hospital Plainview On Fri, 23 Dec 2005 21:38:01 -0800, Tim <timb@covenantplainview.org> w...

Backup mail server deliver for given mail domain
I have two completely independent exchange servers running in two physically different locations. In my case I have an MX record that states #1 should be the primary mail handler for a domain and #2 the backup. My problem is that some people use #2 as their main server and whenever they send mail to an address that #2 is the backup for, it doesn't get sent to the #1 server, but rather delivered locally. Is there a way that I can configure #2 to first try to deliver the mail to the primary mail server for that domain? I hope this is clear. Thanks Exchange will never lookup DNS if mail ...

Recovery Storage Groups on seperate server
Environment - One Exchange 2003 Standard Server SP2 on Windows 2003 Server SP1 with one Storage Group - 4 databases under that storage group. Problem - Currently I am expermenting in our test environment with the use of Recovery Groups in an attempt to create a more timely DR process. Is there anyway to have the restored databases for a Recovery Storage Group on a seperate server from the original databases? In other words can you somehow point the recovery storage groups to something other than a local drive? I've attempted trying to point just using a mapped network drive, but rec...

Opening Access Database from Internet Explorer
sWe currently have a site where we can upload files and then a user can access these files. Currently we have an access database which when you click on the link you get the option to either save it or open it. When you click Open the Access database opens just fine on the machines that have Access 2003 but not the case for the machines that have Access 2007. At first I thought it was because I was trying to open a .mdb on a machine that has Access 2007 but then I created an Access 2007 database and the same error when I tried to open it through the site. Is anyone aware of c...

Tables to PDF
Hi there, I'm working with a table in Publisher at the moment & have formatted all my column / row gridlines to 0.25pt. However, when I convert to Adobe PDF, some of the lines appear much thicker than the others. Any Suggestions? Ian Have you tried printing the .pdf file? I've seen lines that look thicker but print just fine. -- JoAnn Paules MVP Microsoft [Publisher] "ianp" <ianp@discussions.microsoft.com> wrote in message news:402A32B6-8157-4D23-907A-9C437BD4FE35@microsoft.com... > Hi there, > > I'm working with a table in Publisher at...

What is the difference between table relationships and links?
I am new to Access & need to understand the differences between a link & a relat ionship to a table or database. I am told the table must be created before the database, but I need several tables for my data. I need to ensure I use the correct method to allow me to create a database using the various connected tables. Please help! A link to a table is basically a connection path to a source of data that exists somewhere other than the current Access application. The data source can be to a table in an MS SQL Server, Oracle, a text file, an Excel sheet, or anoth...

how to build a normalized table with the following details in it?
I am building a database of food nutrients and their characteristics (roles, food sources, benefits, deficiency symptoms, combination with other nutrients etc.) . Since each food nutrient has more than one roll, one source etc, i currently have a huge table with the food nutrients as column titles (vitamin A, B, C etc) and in column A i named lines with characteristics : role 1 , role 2, role 3..., food source 1, food source 2, food source 3...etc. Reading the notes exchange on the group i realize i have not set up the table correctly for Access since i can't search for data i...

How do I show summary totals from a pivot table on a bar chart
I created a pivot table which shows the both individual and grand totals based on the fields I selected. I then created a bar chart based on this pivot table. What I would like to do is show the grand totals as well as the individual totals. Is this possible, if so how do I do it? When I try this (link to the pivot table's summary total) I get an error saying not a valid function. The function line contains =GETPIVOTDATA("Personnel no.",'P2'!$A$3) "Jon Peltier" wrote: > Colleen - > > You can add textboxes to the chart, which are linked to works...

Folder permissions not inheriting from parent (Server 2008 R2) ?
I am having problems with sub folders/files not inheriting the permissions set on a top level folder. I have a top level folder c:\foo which is set NOT to inherit from parent, and I select copy the permissions from c:\ when I untick inherit. I then add a number of user permissions to that folder, checking the Replace permission entries on all child objects..... check box. If I reopen properties/security/advanced security for foo the permissions are set correctly. If I create a file in foo, this has the correct permissions. If I create a folder bar in foo, this inherits the use...

Win2k8 Server with Exchange?
Hi, Is Win2k8 Server comes with Microsoft Exchange or do we have to buy MS Exchange separately? Thanks, Garu Hello Garu, Exchange is a separate software. Or you use Windows small business server, which has limitations as only 75 users for example. http://www.microsoft.com/sbs/en/us/compare-features.aspx Best regards Meinolf Weber Disclaimer: This posting is provided "AS IS" with no warranties, and confers no rights. ** Please do NOT email, only reply to Newsgroups ** HELP us help YOU!!! http://www.blakjak.demon.co.uk/mul_crss.htm > Hi, > ...

Specify two server accounts
Hi, My MS Outlook is set up for two server accounts: Account 1 - In: work server, Out: work server, User info: work e-mail address Account 2 - In: home server, Out: home server, User info: work e-mail address I've set up the user info to show my work e-mail address in both cases because I reply to a lot of work e-mails at home. However, I also check and respond to home e-mails while I'm at work (using the work server); and also respond to home emails at home (using the home server). I would like my sent e-mails to show my home e-mail address. So I set up these additional ...

LDAP Operations on Exchange Server
Here is my current setup: 2 Window 2003 servers running Active Directory, both GC's An Exchange 2003 Server with a migration from a Windows 5.5 Exchange server. I've checked the Recipient Update Service on my Exchange server and both are pointing to NT4DC which is an upgrade of a NT4 PDC to Windows 2k3 domain controller. I am getting these two errors on a continious basis: Event Type: Error Event Source: MSADC Event Category: LDAP Operations Event ID: 8026 Date: 1/16/2006 Time: 10:35:41 AM User: N/A Computer: NT4DC Description: LDA...

I did a reset account of a computer account in AD which is an exchange server #2
How can I get the exchange to talk back to the AD again ... Thanks Andy ...

Is there a way to insert a copied row into all aother tabbed table
I have a file with about 100 tabs along the bottom for other tables. I have a row that I need to copy and insert into each one of those (at the top, first row). I can copy and insert row into each tab individually but is there a way to have this insert into all of them at once in the same place? Yes. Group the sheets. For Excel help on how to group sheets, type "group sheets" into Excel help. -- David Biddulph "Greg" <Greg@discussions.microsoft.com> wrote in message news:09E31216-B19F-44F2-BEA2-8F913BA1ABB5@microsoft.com... > I have a file w...

Sales transactions Tables activity
I have Great Plains 9.0 with Service Pack 3 and am looking for a quick explanation on Sales Transactions table entries. Is there any way someone can quickly go over what exactly happens on a Sales Order during the Sales Transaction process. From placing an order, to picking it, to fulfilling it, to invoicing and creating a back order. My issue is that we have moved from printing Pick Tickets at time of order entry, to having our Warehouse print the pick tickets once an hour. The problem is that some Pick tickets don't print, and we cannot determine why. The reps who have entered the o...

Exchange Server Renaming
I have a problem which I am fairly sure I already know the answer to but just thought I would get a second opinion. Exchange Server 2003 machine with seriously low hardware spec. I want to move this onto new hardware. I have an Exchange Organisation with 7 exchange servers. The suggestion was that I install this new server, transfer all the mailboxes(600+) onto it allow replication etc. to occur then decommision the old exchange server, and here is the interesting part RENAME the new exchange server to the old servers name so that the naming convension is right. No my instant reaction...

A chart that always looks at the latest few weeks data in a table
Hi, Any idea how I would create a chart that always looks at the last 12 weeks data in a table that gets added to each week Many Thanks DC See Dynamic Charts http://www.tushar-mehta.com/excel/newsgroups/dynamic_charts/index.html particularly example 2 -- Tushar Mehta http://www.tushar-mehta.com Custom business solutions leveraging a multi-disciplinary approach In Excel 2007 double-click to format may not work; right click and select from the menu "broken hippy" wrote: > Hi, > > Any idea how I would create a chart that always looks at the last 12 weeks > data i...

Virtual memory fragmentation in Windows 2000 Server
I am running Exchange 2003 on Windows 2000 Server. The following happens with Trend Micro Scanmail services disabled. When I start the Information Store service I have a 376 meg VM Largest Block Size. Throughout the day the VM Largest Block Size decreases to about 170 meg. About an hour after the online defrag starts on the mailbox store the VM Largest Block Size instantly dives to 70 meg. This happens every day. I receive no errors in the event log and the virtual memory does not decrease below 70 meg. I have run isinteg on the private store until there are no errors and this still hap...

Adding a pivot table in Excel 2007 from a QUERY in Access 2007
What am I missing here? In Excel 2003 I was able to create a pivot from a query in a Access 2003 database. Now when I go to create the pivot in Excel 2007 I only get the Access table to show up, not the queries. Process in Excel 2003: Data>PivotTable and PivotChart Wizard> External Data Source>Get Data>MS Access Database>(Select Database)>(Select Access Query and move from "Available tables and columns" to "Columns in your query">Next>Next>Next>Finish Process in Excel 2007: Insert Tab> PivotTable>Use an external data source>Choose...

MS Access Copy record to another table based on a form input 10-08-07
Hello. I have 6 Tables, all with identical fields. I want to copy a record from one table into another table, which table depends on what table is selected in a form. So if the table names are One, Two, Three, Four, Five, Six, and the record that I want to copy and insert into another table has been selected by a query in a form. I want the form to direct where to insert the table. So if the form has table Two selected (from the drop down list) then it should insert the record into table Two. If the form has table Four selected then it should insert it into table Four. The table the record is...

Pivot Tables
When a pivot table has 2 indices, the values of the first index ar left blank on the 2nd and subsequent lines of the 2nd index. Can thes index values be automatically duplicated? Thanks ANdrew Middleto -- Message posted from http://www.ExcelForum.com Andrew, Send me your email address and I'll PM you a small add-in I put together to do this.. Cheers, Dave >-----Original Message----- >When a pivot table has 2 indices, the values of the first index are >left blank on the 2nd and subsequent lines of the 2nd index. Can these >index values be automatically duplicated?...

What do FTP servers do when file send fails durring a file upload? Are partial files ever written? does ftp protocol cover this?
What do FTP servers do when file send fails durring a file upload? Are partial files ever written? does ftp protocol cover this? Daniel wrote: > What do FTP servers do when file send fails durring a file upload? Are > partial files ever written? does ftp protocol cover this? Why not read it and find out? Google for RFC959. And why are you posting this in a Microsoft .NET XML newsgroup when it has nothing to do with Microsoft, .NET, or XML? *plonk* ///Peter ...

Table Import Error
Good Afternoon, My company has recently upgraded from 6.0 to 8.0. I am importing an .csv file and then printing a report. The import seems to be working correctly, what I mean is I receive a message saying it completed. However when I try to pull up the report I receive the following: TABLE IMPORT ERROR That's it no other information, no other users seem to be having this problem, just myself and I get this error on other reports as well, but they all seem to be custom or modified reports from modified or customized forms. Any suggestions? It sounds like your Forms and Reports d...

SMTP works intermittently after FE servers set as NLB pair
After setting two FE servers in an NLB pair (both with smtp previously working), some mail servers cannot open SMTP sockets to the FE NLB pair. IT seems to be only windows boxes odly enough. When i create the pair, OWA, OMA and Activesync work fine as does a telnet to port 25. However, some machines cannot telnet to port 25..all machines in question that have proven unable to access are running win2k or win2k3....sendmail and qmail can open a smtp session to the NLB pair just fine. ANy ideas? On Thu, 20 Jul 2006 13:12:02 -0700, knightly <knightly@discussions.microsoft.com> wrote:...

Ignore table formatting when importing data using OLEDB
I am using Excel 2010. I want to write a macro in a 'consolidate' XLSM file that will query another selected XLSM file and import data from one of the range names in that file, into the 'consolidate' file. When the import occurs, it formats the imported table using the default Excel 2010 table style (see screenshot), however i don't want to format the cells - i just want to import raw data and leave the cells formatted as they are in the 'consolidate' XLSM file. The PreserveFormatting property has no impact, as the damage is already done once the query is added. ...