Posts

Showing posts from April, 2015

How to Create Calculator in CSharp

Image
Step No 1  Open the Visual C# Step No 2  Click on File and Select New Project  Step No 3 Select Windows Form Application  and create buttons like this Step No 4 Know is time of Coding  double click the button 1 to 9  and write this code  

Database Connectivity C Sharp to Access

Image
Step 1: using System.Data.OleDb; Step 2: public partial class Form1 : Form     {         private OleDbConnection conn; Step 3: InitializeComponent();             conn = new OleDbConnection ( @"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=F:\Lecture-notes\c-srp\db1.mdb" ); save button code: OleDbCommand cmd= new OleDbCommand ();             cmd.CommandType= CommandType .Text;             cmd.CommandText = "insert into table1(name,fname,id,sem)values('" + textBox1.Text + "','" + textBox2.Text + "','" + textBox3.Text + "','" + textBox4.Text + "')" ;             cmd.Connection = conn;             conn.Open();   ...