Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET
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 21-Jan-13 7:12am
Comments
richcb at 21-Jan-13 12:14pm
   
Are you using a connection string to a sql server?
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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[^]
  Permalink  
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

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.
  Permalink  

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



Advertise | Privacy | Mobile
Web03 | 2.8.1411023.1 | Last Updated 21 Jan 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100