![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
|
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 (AT) discussions (DOT) microsoft.com> wrote in message news:84F967B5-08BF-4E23-9C73-A19AFE8A978B (AT) microsoft (DOT) com... 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 |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |