using System;
using System.Collections.Generic;
using System.Text;
using System.Data.OleDb;
using System.Data;

namespace hotel
{
    class Class1
    {public void insert(string text)
         {

             string a = "provider=microsoft.jet.oledb.4.0;data source =hotel12.mdb";
			
			OleDbConnection con = new OleDbConnection(a);
			OleDbCommand cmd = new OleDbCommand(text,con);
		
			con.Open();
			cmd.ExecuteNonQuery();
			con.Close();
		  
		}
		public DataSet select(string text)
		{
            string a = "provider=microsoft.jet.oledb.4.0;data source =hotel12.mdb";
			OleDbConnection con = new OleDbConnection(a);
			OleDbDataAdapter da= new OleDbDataAdapter(text,con); 
			DataSet ds = new DataSet();
            da.Fill(ds, "t1");
			return ds;
		
		}
	}
    }

