Click here to Skip to main content
15,908,775 members
Articles / Database Development / SQL Server / SQL Server 2008R2

How to Connect SQL Database to your C# Program - Beginner's Tutorial

Rate me:
Please Sign up or sign in to vote.
4.75/5 (51 votes)
30 Sep 2014CPOL13 min read 1M   13.9K   69  
This article tells the beginners the basic concepts about connecting to the SQL Server database using C#.
This article is for the beginners, to explain the basic concept of data in .NET Framework and how can you use the SQL client in your application to connect to a database. It goes over: Working with SQL Server using C#, connecting to a database, connection pools, executing the commands, parameterizing the data, reading the data returned, catching the errors from SQL Server, and then running through it all with an example.

Views

Daily Counts

Downloads

Weekly Counts

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer
Pakistan Pakistan
Afzaal Ahmad Zeeshan is a computer programmer from Rabwah, Pakistan, currently living in The Netherlands, likes .NET Core and Node.js for regular everyday development. Afzaal Ahmad works at Adyen as a Developer Advocate.

He is an expert with Cloud, Mobile, and API development. Afzaal has experience with the Azure platform and likes to build cross-platform libraries/software with .NET Core. Afzaal is an Alibaba Cloud MVP, twice he has been awarded Microsoft MVP status for his community leadership in software development, four times CodeProject MVP status for technical writing and mentoring, and 4 times C# Corner MVP status in the same field.

Comments and Discussions