using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using System.Data.OleDb;
using System.Windows.Forms;

namespace TobbAblak
{
    static class BD
    {
        static public OleDbConnection co;
        static public bool ok = false;

        public static void Betolt()
        {
            try
            {
                string s = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=" +
            Application.StartupPath +
            "\\Adatok.accdb;Persist Security Info=True;" +
            "Jet OLEDB:Database Password=jelszo";

                co = new OleDbConnection(s);
                co.Open();
                ok = true;
            }
            catch (Exception e)
            {
                ok = false;
                MessageBox.Show("Nem sikerult\n" + e.Message);
            }
        }
    }
}
