数据存取问题 请问如何将
数据库中表里的字段名取出来? 比如说学生信息表中的学号 姓名 成绩等等 这样的名字怎样取出来? 能否写一下
代码 谢谢各位 请指教 __________________________________________________________________________ select name from syscolumns where id=object_id( ''tablename '') __________________________________________________________________________ Imports Sy
stem.Data Imports Sy
stem.Data.
sqlClient Public Class Form1 Private Sub Form1_Load(ByVal sender As Object,ByVal e As Sy
stem.EventArgs) Handles Me.Load Dim da As New
sqlDataAdapter( "SELECT * FROM 表名 ","您的连接词 ") Dim ds As New DataSet da.Fill(ds) For i As Int32 = 0 To ds.Tables(0).Columns.Count - 1 Msg
Box(ds.Tables(0).Columns(i).Caption) Next End Sub End Class __________________________________________________________________________
列出表里的所有的字段: select name from syscolumns where id=object_id( ''TableName '') 顶ls的ls。 __________________________________________________________________________