How to Connect MS Access Database to C# 2013 2015 and 2010

using System; using System.Collections.Generic; using System.Text; using System.Data.OleDb; namespace Library_System { class book { public static int listlenght; static string conn = @”Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\library\project.mdb”; static OleDbConnection dbConnection = new OleDbConnection(conn); public bool addbook(string name, string…

How to Update Query in SQL in C# 2013 and 2010 Code

Delete Query in SQL Server in C# 2013 using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Data.SqlClient; using System.Text; using System.Windows.Forms; namespace Your_Project_Name { class Schedule { SqlCommand cmd = new…

How to Delete Query in SQL Server in C# 2013 2010 and 2008 Code and Class

Delete Query in SQL Server in C# 2013     using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Data.SqlClient; using System.Text; using System.Windows.Forms; namespace Train_reservation_1._0 { class Schedule { SqlCommand…

How to Add Query in SQL Server in C# 2013 2010 and 2008 Code and Class

using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Data.SqlClient; using System.Text; using System.Windows.Forms; namespace Train_reservation_1._0 { class AddTrain { SqlCommand cmd = new SqlCommand(); SqlDataAdapter da = new SqlDataAdapter(); DataTable…

How to Connect SQL Database to C# in 2008 2010 and 2013 Complete Code With Class

SQL Database Connection Code C#  using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Data.SqlClient; namespace YouProjectName { class MyConnection { public static SqlConnection myConnection; public static SqlConnection GetConnection() { if (myConnection == null) { myConnection…

How to Inherit in C# with Classes

Inheritance, in C Sharp, is the ability to create a class that inherits attributes and behaviors from an existing class. The newly created class is the derived or child class and the existing class is the base (or…