PDA

View Full Version : مشگل با ارتباط با بانک اطلا عاتی



asmasm
پنج شنبه 18 شهریور 1389, 19:23 عصر
سلام دوستان
کسی میدونه مشکل این برنامه چه هست که اطلاعات دا خل جدول را در دیتا گرید ویو نمایش نمی دهد



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 WindowsFormsApplication1
{
public partial class Form1 : Form
{

OleDbConnection con;
OleDbDataAdapter dap;
DataSet ds;

public Form1()
{
InitializeComponent();
}


private void Form1_Load(object sender, EventArgs e)
{
string path=System.Windows.Forms.Application.StartupPath;
con = new OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + path + "\\db1.mdb");


dap = new OleDbDataAdapter("select * from Table1", con);
con.Open();
ds=new DataSet();
dap.Fill(ds, "Table1");
dataGridView1.DataSource=ds.Tables[0];
con.Close();









}


}
}






این هه سورس برنامه

55925