Skip to content

Instantly share code, notes, and snippets.

@LavizaFalakNaz
Last active February 5, 2021 23:35
Show Gist options
  • Save LavizaFalakNaz/b40650c3759f514fd6ba0828dd03b9fa to your computer and use it in GitHub Desktop.
Save LavizaFalakNaz/b40650c3759f514fd6ba0828dd03b9fa to your computer and use it in GitHub Desktop.
Connecting OLEDB Databases with ADO.NET Applictaions (C#)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace osman
{
public partial class Payment : Form
{
OleDbConnection con = new OleDbConnection(@"Povider=Microsoft.Jet.OLEDB.4.0;Datasource=D:\\employee.mdb;Persist Security Info=False");
public Payment()
{
InitializeComponent();
}
private void btnsub_Click(object sender, EventArgs e)
{
con.Open();
MessageBox.Show("connection success");
con.Close();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment