Click here to Skip to main content
15,892,643 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
My Vb.net project with database1.mdf file as database runs on the computers where sql server is installed but it shows error on the pc(s) where sql server is not installed. Please somebody help me with brief description and solution about this problem.
Posted
Comments
Richard C Bishop 21-Jan-13 12:14pm    
Are you using a connection string to a sql server?

database1.mdf file as database runs on the computers where sql server is installed but it shows error on the pc(s) where sql server is not installed
MDF will need client to work. While deploying your application, see if the database client is present or not. If not, you need to install the same if that is required for you application. Here, you might need to install SQL Express along with application and database.

Have a look at these:
Creating setup With support for database creation Using VS.NET[^]
Create database during installation of a .NET application [^]
Deploy your Application and Database[^]
 
Share this answer
 
suhan 2012 wrote:
where sql server is not installed

It's necessary that SQL Server is installed, otherwise you can't connect you to it. Actually, you can't create a connection to a MDF file, you need to connect to SQL Server, and if you execute an SQL query, SQL Server modifies the data file. The file contains the data, and SQL Server can read/write to it. It's necessary to install SQL Server.
 
Share this answer
 

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