日期:2014-05-20 浏览次数:21012 次
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Data.SqlClient;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
namespace DataGridViewTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private DataSet ds = new DataSet();
private SqlConnection conn = null;
private SqlDataAdapter da = null;
private const string DRIVER = "server=.;database=northwind;uid=sa;pwd=sa";
private const string sql_select = "select * from region";
/**//**
* 此方法为将数据库northwind中的region表的数据查询出来并放入DataSet中