Home MS Office How to Connect C# with SQL Server in Urdu

How to Connect C# with SQL Server in Urdu


Today I have shared C# Connect to SQL Server, there are two steps to connect C# with SQL Server. First is coding mode second is design. In this article I will understand with you C# connect with SQL server coding mode and design mode. Coding mode is some difficult and design mode easy, but they are very important to understand these steps to connect SQL server with C#.

Basically, SQ Server is a database and C# is a programming language, they are products of Microsoft. Which is used to make a web application, desktop application, and mobile application as well. If you have good knowledge C# programming you must be understood connect with SQL server and insert, update, delete a record using C# and SQL Server.


However, If you are learning/beginner C# programming language and you don’t have any knowledge Database namely SQL Server, you can face different problems. I prefer first of all you learn SQL Server Database after that you will learn C# programming then you will make the web, desktop, and mobile application as well.

Furthermore, First of All, you will make a database and use it, then create a table and insert a record manual with the help of SQL Server. After that record has been saved in your database without using C# programming language. Then you will create a connection using C# programming language. 

C# Connect to SQL Server in String Mode

You will require import “using System.Data.SqlClients” to use SQL queries in C#. After that, you will require “SqlConnection con”, “SqlCommond cmd”, “SqlDataReader dr”, “SqlDataAdapter ap”  these classes are handle to record in your database. I have  declared these classes to create connection and handle database record with using Database.

Now finally you will require a path to connect with SQL Server like “string path=”Data Source, Initial Catalog, Integrated Security” ”. These three ways to connect SQL Server.  Data Source requires Database Server Name for example “Data Source=ASIF\SQLEXPRESS”, Initial Catalog require your database name for example “Initial Catalog=student”, finally Integrated Security requires with security mode for example “Integrated Security=”True””, Basically I am using windows Authentication mode, if you use User Name and Password, you will include Username and Password.

Above all of Create Connection with SQL Server with String Mode. Now If you want to learn to make a Connection with design mode, kindly watch my video tutorial. I have made the video tutorial on this topic and I understand to make a Connection with String and Design mode. I hope this video tutorial is helpful and most beneficial for you.

C# Connect to SQL Server Tutorial in Urdu

Thanks for Watch Complete Video tutorial about C# Connect to SQL Server, after watch video tutorial, I hope you have understood as well and you will learn it something new. Kindly, share my content on social networks and subscribe my website social networks pages like Facebook, Google+, Twitter, YouTube and Email for post updates. If you have any question / suggestion about this topic comment or email me after received your email or comment I will reply with your answer maximum 24 hours. Thanks Again for a visit, Read my Complete Article and Watch my Videos. Keep touch my website I will share popular programming Languages like C# and Windows App very soon.