Sunday, March 11, 2012

Add sdf file to my project when all my sources are on remote machine

I posted this question in the past and did not get any answer.

I put all my sources on a remote server mainly for backup purposes (the remote server is backuped every day) but when I have the .sdf file I can not open it from the visual studio 2005 configuration server here is the description of the problem:

I have an application that runs on a PDA and manage a database (.sdf) file I use C# with visual studio 2005

What I want to do is to add the database file (.sdf) to my project files and open a connection to it.

The problem is that all my source file are stored on remote machine and not locally on my machine and the .sdf file is also stored with the project source files.

When I try to add the file to the project I get the following error fro the data source configuration wizard :

"An error occured while retrieving the information from the database"

DRIVE_REMOTE

Parameter Name : N:\

I get the same error also when I try to open a new connection to the file from the server explorer. When i copy the file to drive "C:" I can open a connection to it with no errors.

I encounter this problem too .
It looks like Sqlce do not allowed connect remotely .
Currently have no answer for this problem.
|||Look at this: http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2191231&SiteID=1|||

Apparently you can't open SDF database on network shares but in this case you don’t have to.

Few possible solutions to that:

- Add a build step to copy database to a local drive and use that copy in the project.

- Build from local drive and add a script executed at particular time to copy everything to the remote server so it would be backed up.

- Start using version control system (e.g. VSS) instead of rather primitive remote copy.

Last one is the best in my opinion.

No comments:

Post a Comment