How to Connect SQL Server Database with Visual Studio | FoxLearn

How to Connect SQL Server Database with Visual Studio | FoxLearn


Welcome to foxlearn In this tutorial, i’ll show you how to connect to the sql database from the visual studio then create a simple windows form application that allows you to retrieve customer data from the Northwind database If you don’t already have a Northwind database, you can download and install it from the foxlearn website Click on SeverExplorer tab, then right click on Data Connections and select add connection Select Microsoft SQL Server from the data source list then enter your sql account and select the sql database that you want to connect to retrieve the data You can create a DataSet, then drag the customer table to your DataSet As you know, DataSet is an in-memory cache of data retrieved from a data source, is a major component of the ADO.NET architecture The DataSet consists of a collection of DataTable objects that you can relate to each other with DataRelation objects From your visual studio toolbox drag a datagridview to your windows form application, then add a datasource to your datagridview Thank you for watching this video

9 comments

  1. I have around 200rows data for a month so i save it with date column, but i want to know each month contain 200 rows of data, so should i create new table for each year or store many years data in single table or there is any other best way to deal with this, please help with you advise 🙂👍

  2. when i set the connection in the App.config file and release the application and give it to someone i have to give them the filename.exe.config too if not they will not be able to connect to the sql server and if i give them the file it has my sql server information

Leave a Reply

Your email address will not be published. Required fields are marked *