select 说明 From table1

解决方案 »

  1.   

    可以这样,
    但是最好先建立DATASET,用COMMAND执行
      

  2.   

    timmy3310:老兄,看清题目呀它不是数据字段的内容
    说明的内容怎么能访问呢,不可能吧
      

  3.   

    试一试System.Data.DataColumn类的Caption属性
      

  4.   

    SqlConnection conn = new SqlConnection("连接字符串");
    SqlCommand cmd = "Sql 语句";
    SqlAdapter sa = new SqlAdapter(cmd,conn);
    DataSet ds = new DataSet();
    sa.Fill(ds);
    string FirstStr = ds.Table[0].Rows[i]["字段名称"].toString();
    string SecondStr = ds.Table[0].Rows[i]["数据类型"].toString();
    string ThirdStr = ds.Table[0].Rows[i]["说明"].toString();其中:Rows后面的i表示数据库中有多少条记录,如果知道要显示的记录在多少条可换成相应的数字.
      

  5.   

    试了,不行:
    private void button1_Click_4(object sender, System.EventArgs e)
    {
    try
    {
    OleDbConnection myConn=new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source="+Application.StartupPath+"\\First.mdb;");
    myConn.Open();
    //建立数据集
    DataSet thisDataSet=new DataSet();
    //建立适配器
    OleDbDataAdapter studentAdapter= new OleDbDataAdapter("SELECT * FROM Student",myConn);
    OleDbCommandBuilder studentBuilder=new OleDbCommandBuilder(studentAdapter); //填充
    studentAdapter.Fill(thisDataSet,"Student");
    string s1=thisDataSet.Tables["Student"].Columns["Serial"].Caption;//结果是serial
    MessageBox.Show(s1);
    myConn.Close();

    }
    catch(OleDbException ex)
    {
    string caption = "加载检查";
    MessageBoxButtons buttons = MessageBoxButtons.OK;
    DialogResult result;
    result = MessageBox.Show(this,ex.Message, caption, buttons,
    MessageBoxIcon.Warning, MessageBoxDefaultButton.Button1 
    );
    }
    }
      

  6.   

    chinchy(人民需要人民币) 对,但楼主描述的不清楚
      

  7.   

    此问题需要问问Microsoft人员,因为在Access中打开表时,字段名显示的就是说明内容