using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.OleDb;
namespace WindowsApplication1
{
public partial class Form1 : Form
{
int pageSize = 0;
int maxRec = 0;
int pageCount = 0;
int currentPage = 0;
int recNo = 0;
DataSet ds = new DataSet();
DataTable dtSource = new DataTable();
public Form1()
{
InitializeComponent();
}
private void Form1_Load(object sender, EventArgs e)
{
string strconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=E:/My Documents/Visual Studio 2005/Projects/WindowsApplication1/WindowsApplication1/表.mdb";//連接數據庫
OleDbConnection conn = new OleDbConnection(strconn);
conn.Open();
OleDbDataAdapter sda = new OleDbDataAdapter("select * from Area", conn);//這裡就隨便取一數據了
sda.Fill(ds, "ds");
conn.Close();
dtSource = ds.Tables[0];
getFillDateset();
}