yazdığım kodları aşağıya ekledim.
DataGridWiev üzerinde veri listelemek istiyorum. ama normalde veri olmasına rağmen görünmüyor. hiçbir hata da vermedi.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.OleDb;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public OleDbConnection baglanti = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Users\\PC\\Desktop\\datakurs.accdb");
public OleDbCommand komut = new OleDbCommand();
public DataSet tablo = new DataSet();
private void Form1_Load(object sender, EventArgs e)
{
baglanti.Open();
OleDbDataAdapter bilgilerial = new OleDbDataAdapter("Select * from personel", baglanti);
bilgilerial.Fill(tablo, "personel");
dataGridView1.DataSource = tablo.Tables["personel"];
baglanti.Close();
}
}
}
DataGridWiev üzerinde veri listelemek istiyorum. ama normalde veri olmasına rağmen görünmüyor. hiçbir hata da vermedi.
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using System.Data.OleDb;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
public OleDbConnection baglanti = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\Users\\PC\\Desktop\\datakurs.accdb");
public OleDbCommand komut = new OleDbCommand();
public DataSet tablo = new DataSet();
private void Form1_Load(object sender, EventArgs e)
{
baglanti.Open();
OleDbDataAdapter bilgilerial = new OleDbDataAdapter("Select * from personel", baglanti);
bilgilerial.Fill(tablo, "personel");
dataGridView1.DataSource = tablo.Tables["personel"];
baglanti.Close();
}
}
}