1

I am new to application development and trying to select a local database for my c# Windows form application but couldn't find that option.

There is only Service-Based Database option available which I do not consider suitable for me.

Anyway, should I use this option because there is no local database option available in the higher versions of Visual Studio, or just I cant find it?

enter image description here

I search for this, enter image description here

Thanks for your time

11
  • i guess thats a Web Service based db option such as API's. you can create a DB class that you will use and put your methods in it then call it from everywhere. or if you know Entity Framework make it EF model. Commented Nov 5, 2018 at 7:35
  • in the left hand treeview, change the filter to show Data- there you will see some options Commented Nov 5, 2018 at 7:39
  • I did it but there is no local database option in my version of visual studio @JohnB Commented Nov 5, 2018 at 7:40
  • hmm i guess you need Server Explorer. i think they moved it to there you make the connection through it and use it inside your application with DataSet option. Commented Nov 5, 2018 at 7:41
  • Can you, please, provide a link or tutorial, cause I am new and I do not undestand much @Halilİbrahim. Thanks again for your help Commented Nov 5, 2018 at 7:42

2 Answers 2

1

That template is no longer available, but using free SQL Compact Toolbox extension you can easily add a SQL Server Compact database to your project and generate code to work with it on top. Microsoft's recommendation is to use SQL Server Express (Service-based database) instead.

Sign up to request clarification or add additional context in comments.

Comments

1

Is there a specific database tool you would like to use? Entity Framework, NHibernate or ADO.NET

but no matter what you are planning to use, if you need to include your database file in your project, you can create the database file using Microsoft SQL Express and merely copy the MDF file in your App_Data folder or any folder.

4 Comments

I need to run queries using my application, Like index updating TSQL program from application on my SQL Server, so basically I do not need to trandfer my mdf, ndf and ldf files to my application. I do not gonna need any information from any database
actually what you need is some knowledge gained by doing a simple tutorial - try this: msdn.microsoft.com/en-us/library/ms171884.aspx
I agree with @JohnB follow a basic tutorial and come back here if you face specific problems doing your application

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.