muktesh

muktesh

  • NA
  • 11
  • 0

How to insert data in Microsoft Office Access database using C#?

Apr 10 2009 6:19 AM
I have a database name details.mdb in Microsoft Office Access database in this data base there is one table name info it contain two coloum name and age.

I have form in that form there are two text box name TextBox1,TextBox2 and a Button1.

I want that the information entered in both textbox should stored in details.mdb database.

So please give me total code to do this i am new to C# plz help

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;

namespace Project2
{
    public partial class Form1 : Form1
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void Button1_Click(object sender, EventArgs e)
        {
                 //what should i write here so that it store in details.mdb database.
        }

    
    }
}


Answers (4)