Database WPF

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 1

First you need to create a new database in SSMS and add at least 1 table.

For the logon in SSMS just use Windows Authentication. Now once you have that you can open up MSVS 2010 express and go to the server explorer. Right click and add a connection. Use the same settings you did to logon to SSMS and the server should appear. Now comes the interesting part. What you do next depends on if you are going to use ADO .NET, Entity Framework, etc. For ADO .NET all you need to do is click on the server in server explorer and in the properties it will show you the connection string. Copy this connection string and either use it directly in your calls via SqlConnection (System.Data.SQLClient) or put it in the app.config and reference it from there. Once you have a database up and running and you can connect to it you can add a new dataset to your project. Right click>Add new item->Data->Dataset. Now drag one of your tables from the database over to your dataset designer. If you do not need the tableadapter delete it as all datasets in MSVS by default have table adapters. Try this Its one of the best method which we can use

You might also like