Copying tables in SQLEXPRESS

M

Michel Vanderbeke

Hello,

I have a program, running in several places, using SQLEXPRESS as database.
The different places are stand-alone, and not connected to a network.
Regulary, I have to apply changes on certain tables of the database.

In a previous program, written in VB6 with an Access database, I used JRO
through VB6-code to delete the table in the different databases and to copy
the new one.

Is something similar possible with SQLEXPRESS. I would like to be able to
update tables in an SQLEXPRESS database file by deleting them and replace
them with the new table. Is this possible through VB.NET code?

Many thanks and greetings from Brugge (Bruges - Belgium),

Michel
 
C

Cowboy \(Gregory A. Beamer\)

Yes, you can use SMO to achieve what you desire. (SQL Management Objects).
You can also script out the DDL and run it.

.... provided the acount you are doing this under has sufficient privileges
(both SMO or DDL).

--
Gregory A. Beamer
MVP, MCP: +I, SE, SD, DBA

*************************************************
| Think outside the box! |
*************************************************
 
W

William Vaughn

I suggest you try ADO.NET 2.0 and SqlBulkCopy. It can copy any data source
exposed with a DataReader to SQL Server.

--
____________________________________
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top