views:

1897

answers:

6

I am creating a window application that need to use sql server database. I want to install this application to client machine without installing sql server so that my application can still connect to a database i.e mdf file that i will be providing at client system.

How can i connect to a database(mdf) on client machine through my window application without installing sql server. ? I dont know is it possible or not.

If possible what will be the connection string in that case. Database need not be used in network.

Client mahine dont need any installation. Every thing needs to be run through pen drive

+7  A: 

.mdf files are SQL Server database files. No other application can understand, read or update those files. If you need to open and mdf, you need a SQL instance. That instance can be local, can be an Express edition, or can be a remote one, doesn't matter. If your application needs a local SQL instance for it's own use then it can install SQL Server Express Edition when deployed.

Remus Rusanu
You can't use an mdf on a pen drive scenario.
Remus Rusanu
A: 

Yes,

Remus is right.

To connect .mdf file in your application you need to have a sql server instance running. It can be free version, SQL Server Express Edition or higher version running on local machine or in any network machine.

Anand Malli
+1  A: 

You can try Sql Compact Edition or SqlLite. I think these are just a file based solution.

Chris Dunaway
A: 

mine is question is continuation of above question! i have developed winforms application in vb08 prof with sql server 2005.. and now i need to install it on many of client computers. so should i use sql server 2005 itself on client machine or install sqlexpress 2005 or sqlexpress 2008 is sufficient??

shekar
are client machine on a same network or they all r disconnected ?
Shantanu Gupta
A: 

It is my question too. I developed a c# 2008 winform application (it uses a db connected to sql server 2000) and now I want to use it on another computer that doesn't have sql server (any versions). So how to run this application on the other pc? Thanks in advanced

mirsaman