Click here to Skip to main content
15,897,187 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have created a VB.NET application, which interacts with MS SQL server 2008, the basic data base file was created using MS SQL Management studio,
Now i want to install all these to another pc, for which it is created but i dont want to install SQL Management studio their, this is what i need to know, how to copy or install my DDL there?
Posted

i want to install all these to another pc, for which it is created but i dont want to install SQL Management studio their, this is what i need to know
You don't need to install database on every system. All you need to make sure is database is present on an accessible server via given connection string.

For more details, look here: Connection String[^]. The link above provides all info about connection string.
 
Share this answer
 
Hello

There are many ways to redistribute your application. The easiest one is called XCOPY deployment.

In a nutshell what your need to do is simply copy the program files and the database mdf file to the destination PC and use a special connection string.

Something that looks like this:
string conStr = "Data Source=.\SQLExpress; Initial Catalog=; Integrated Security=true; AttachDBFileName=" + Application.StartupPath + "\MyDb.mdf "


It makes thing easier to make store the sqlserver mdf file in a folder within your application folder.

More details on msdn:
http://msdn.microsoft.com/en-us/library/ms165716(v=SQL.100).aspx[^]

Valery.
 
Share this answer
 
Comments
RaviRanjanKr 21-Dec-11 15:51pm    
5+
Valery Possoz 21-Dec-11 16:04pm    
Thanks :)

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