Re: Replacing tables in SQL EXPRESS
- From: "William \(Bill\) Vaughn" <billvaRemoveThis@xxxxxxxxx>
- Date: Sat, 15 Sep 2007 13:43:21 -0700
I have posted an updated example on the Hitchhiker's Guide support site. As a registered user you should have full access to the project.
Let me know if you have other issues. I'll be writing a more in-depth discussion of the method (to supplement what's already in the book) and post that in the next couple of days. I also expect to publish this whitepaper and part of the code in my regular "First Tuesday" Developer.Com article. Note that the example posted to the readers' side also includes the source code for my SqlCmd class that's designed to parse a text file containing an SQL script and execute it against a selected SqlConnection. This will appear in a future Developer.Com article published at a later date.
hth
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------
"Michel" <Michel@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:8519C4F0-F70C-449F-8223-0A6BC6FB853E@xxxxxxxxxxxxxxxx
Dear Mr. Vaughn,
I bought your extensive book and the only reference to the SqlBulkCopy
method I find in the index refers to pages 527 - 528.
There is a small chapter on the matter, but I do not find any examples or
code to demonstrate its use.
On the DVD are some examples but none refer to the SqlBulkCopy method, as
far as I could see.
As I am new to all matters regarding SQL Server, can you please point me in
the direction where I can find sample code and further information on how to
achieve the tasks I described earlier?
Many thanks and greetings from Brugge (Bruges - Belgium),
Michel
"William Vaughn" wrote:
Michel,
Check out the SqlBulkCopy method in ADO.NET 2.0. It can copy an entire
table in a single (high-speed) operation. I have an example of its use in my
book.
--
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant, Dad, Grandpa
Microsoft MVP
INETA Speaker
www.betav.com
www.betav.com/blog/billva
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
-----------------------------------------------------------------------------------------------------------------------
"Michel" <Michel@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:84F967B5-08BF-4E23-9C73-A19AFE8A978B@xxxxxxxxxxxxxxxx
> Hello,
>
> Can someone please set me on the way on how to replace certain tables > in a
> (new) SQL EXPRESS database file by tables of the same name in another
> (target) SQL EXPRESS database file?
> I would like to do this through code in VB.NET 2005. I presume I have > to
> use ADO.NET 2.0 code.
> Is it correct I first have to delete the original table in the target
> database by a DROP statement and the copy the new table into the target
> database? Or do I use a DELETE statement and the fill the empty > database
> by
> the new data?
> Do I need a second connection to the database with the new tables?
> I am a newbie in this matter, so any help would greatly be appreciated.
> Also lins to usefull example code is welcome.
> I searched already for info on the internet, but mostly the information > I
> found is not very usefull for my purpose.
>
> Many thanks and greetings from Brugge (Bruges - Belgium),
>
> Michel
>
.
- Follow-Ups:
- Re: Replacing tables in SQL EXPRESS
- From: Michel
- Re: Replacing tables in SQL EXPRESS
- References:
- Re: Replacing tables in SQL EXPRESS
- From: William Vaughn
- Re: Replacing tables in SQL EXPRESS
- From: Michel
- Re: Replacing tables in SQL EXPRESS
- Prev by Date: RE: how to get the id of the inserted datarow?
- Next by Date: Re: is there some per-process-limit on memory in .net processes? is there any way to increase it? i keep getting System.OutOfMemoryException when my box has 8 gigs of unused memory.
- Previous by thread: Re: Replacing tables in SQL EXPRESS
- Next by thread: Re: Replacing tables in SQL EXPRESS
- Index(es):
Relevant Pages
|
Loading