Click here to Skip to main content
15,889,335 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,
Is there nay way that my application could create a new instance (say MyInstance) and attach my DB to that, with sa password?

Please give me vb.net code for it if possible.

Thanks a lot.
Posted
Updated 20-Feb-12 5:53am
v4
Comments
Sergey Alexandrovich Kryukov 20-Feb-12 12:46pm    
A new instance of what, exactly? A server? what would it mean?
--SA

1 solution

Not really practical - SQL server needs a fair amount of setup, with quite a few decisions needing to be made by the user.
Besides, it is a very bad idea to proliferate SQL server instances - if nothing else, it removes the main advantage of using SQL Server - multiuser access. If you program installs a fresh instance on each pc, then each pc will use a separate database, with no shared information. There are much simpler, quicker ways to do that.
 
Share this answer
 
Comments
Furqan Sehgal 21-Feb-12 7:13am    
Actually only server application shall install fresh instance not the client one.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900