4 Replies - 8130 Views - Last Post: 05 November 2012 - 03:30 PM Rate Topic: -----

#1 ken2010  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 05-December 10

DEploy C# application with database (.mdf)

Posted 01 June 2012 - 03:20 AM

Please how do I deploy C# application with .mdf database? Thanks.
Is This A Good Question/Topic? 0
  • +

Replies To: DEploy C# application with database (.mdf)

#2 negligible  Icon User is offline

  • D.I.C Regular

Reputation: 62
  • View blog
  • Posts: 302
  • Joined: 02-December 10

Re: DEploy C# application with database (.mdf)

Posted 01 June 2012 - 05:24 AM

Try this, it's a well documented feature.

Do you have the application already or are you looking to develop it yourself?
Was This Post Helpful? -2
  • +
  • -

#3 eclipsed4utoo  Icon User is offline

  • Not Your Ordinary Programmer
  • member icon

Reputation: 1524
  • View blog
  • Posts: 5,960
  • Joined: 21-March 08

Re: DEploy C# application with database (.mdf)

Posted 01 June 2012 - 05:32 AM

View Postnegligible, on 01 June 2012 - 08:24 AM, said:

Try this, it's a well documented feature.

Do you have the application already or are you looking to develop it yourself?


1. He's talking about an .mdf(SQL Server) file, not an .mdb(Access) file.
2. He's not asking how to connect. He's asking how to deploy the database with his application.

View Postken2010, on 01 June 2012 - 06:20 AM, said:

Please how do I deploy C# application with .mdf database? Thanks.


The easy answer is, include the file into the project(Add --> Existing Item..). If you are using an installer, you will also need to add it to the installer(the same steps).

The harder answer is, why are you deploying a full blown SQL Server database with your application? Does multiple instances of your application run and need to share the same data? Or does your application run locally and only need the data for itself?

If it's the latter, you should look into using a SQL CE database(.sdf) file. SQL CE databases don't require the installation of SQL Server. You can add a SQL CE database to a project by adding the "Local Database" item(Add --> New Item.. --> Local Database).
Was This Post Helpful? 1
  • +
  • -

#4 ken2010  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 38
  • Joined: 05-December 10

Re: DEploy C# application with database (.mdf)

Posted 01 June 2012 - 07:14 AM

Thanks guys! I have found a way to fix it. i really appreciate you professional contributions
Was This Post Helpful? 0
  • +
  • -

#5 misSamso  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 05-November 12

Re: DEploy C# application with database (.mdf)

Posted 05 November 2012 - 03:30 PM

View Postken2010, on 01 June 2012 - 07:14 AM, said:

Thanks guys! I have found a way to fix it. i really appreciate you professional contributions


Could you please tell me how you did it ? I am an IT student and I'm working on my Graduation Project for two months and finding difficulties in this task, please help me my time is wasted and I'm confused by switching between different database applications :(

Thank you
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1