2 Replies - 705 Views - Last Post: 06 June 2010 - 06:25 AM Rate Topic: -----

#1 Boyan  Icon User is offline

  • D.I.C Regular

Reputation: 4
  • View blog
  • Posts: 254
  • Joined: 09-September 07

Restoring a SQL database

Posted 02 June 2010 - 08:46 AM

So, I got a complete project made in C# that reads and edits full database made in SQL. I restored the database, but I'm not sure what I'm doing is right. I just changed the ConnectionString's server name in the original source to my server name and it doesn't work.

When I try to load a new Data Connection I'm getting this:

Posted Image

Please note that I'm quite new in this and probably doing something very wrong in implementing the restored database on another PC.

I need this so I can run the application. Can anyone tell me what am I doing wrong?


This post has been edited by Boyan: 02 June 2010 - 08:47 AM

Is This A Good Question/Topic? 0
  • +

Replies To: Restoring a SQL database

#2 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1533
  • View blog
  • Posts: 5,972
  • Joined: 21-March 08

Re: Restoring a SQL database

Posted 02 June 2010 - 01:31 PM

Do you have SQL Server or SQL Server Express installed? If so, the instance that is running is using that database file.
Was This Post Helpful? 0
  • +
  • -

#3 pipjt  Icon User is offline

  • New D.I.C Head
  • member icon

Reputation: 2
  • View blog
  • Posts: 11
  • Joined: 19-November 08

Re: Restoring a SQL database

Posted 06 June 2010 - 06:25 AM


If the file is being used then more than likely it is being actively hosted by an instance of Microsoft SQL Server.

Make sure that you connect to SQL Server when setting up your data source rather than trying to read the actual .mdf file.

Are you running SQL Server compact of a full version?


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1