Re: convert .mdf to .sdf

Posted 14 May 2010 - 08:25 AM

1. You will need to change your connection string. You are not running a SQL Express database anymore. SQLCE(which is what .sdf is) uses a different connection string. http://www.connectio...-server-2005-ce

Re: convert .mdf to .sdf

Posted 14 May 2010 - 09:51 AM

You would use "Microsoft SQL Server" when choosing the datasource.

A service-based instance is an instance of SQL Server that is running as a service. You can open your Services(Control Panel --> Administrative Tools --> Services) and you will see SQL Server services running.

On my PC, I have the full versions of SQL2005 and SQL2008, but I also have SQL Express 2005. This is what your instance will look like. When you specify this in your connection string("Data Source=.\\SQLEXPRESS"), this is what you are connecting to.

Re: convert .mdf to .sdf

yep its a school project xD that should be run on any PC with the database updated whenever it is used.

Example if i add an Employee ID and his details on my PC or any PC, when i use the project on another PC (without network) it should find the previously added Employee ID and details.

can u suggest ur best way to connect my project with the database for my purpos pls?

Let me make sure I understand the requirement.

1. You could have X number of PCs.
2. None of the PCs are connected to a network, internet, or each other.
3. You want to be able to add/update/delete records on one PC and have ALL other PCs see that change.

If all three of these are correct, you are screwed because that's not possible. If there is no connection between the PCs, there is no way for them to talk to each other, giving them no way to notify each other of the database changes.

Re: convert .mdf to .sdf

Posted 14 May 2010 - 11:59 AM

do you mean the database will be moved? As in something like this...

-- changes made to the data in the database
-- database is copied from PC-A to a flash drive(or other storage media)
-- storage media is plugged into PC-B
-- database is copied from storage media to PC-B
-- application is opened on PC-B and the data changes are there