O'Reilly logo

Microsoft SQL Azure: Enterprise Application Development by Jayaram Krishnaswamy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using SqlBulkCopy

We will be using SqlBulkCopy; a class supported from .NET Framework 2.0, to copy data from a table in SQL Express to a table with the same schema in SQL Azure.

The details of SqlBulkCopy class displayed in Visual Studio 2010 RCs Object Browser is shown in the following screenshot:

Using SqlBulkCopy

The data transfer takes place from one database object on one server, to a database object with a similar schema on another server. We will transfer the data from the Shippers table in Northwind on SQL Server 2008 Express, to a table in the Bluesky database on SQL Azure.

Create a table in the destination server

In the next step, we will create a table in ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required