On Tue, 25 May 2004 15:41:03 -0700, "dtemlak" <an*******@discussions.microsoft.com> wrote:
¤ Hi there,
¤ I am a bit new to vb.net. I have figured out how to use a data reader to get column and row information from my MS Access database using OLEDB. The problem is that while I can easily get the column names, I can NOT seem to get any properties associated with a given col.
¤
¤ For example, I have configured specific CAPTIONS in my Access DB that I would like utilize in my vb.net program. Any help would be appreciated!
¤
Use the OLEDB provider instead:
Dim DatabaseConnection As New System.Data.OleDb.OleDbConnection
Dim SchemaTable As DataTable
DatabaseConnection.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=E:\My Documents\db1.mdb"
DatabaseConnection.Open()
SchemaTable =
DatabaseConnection.GetOleDbSchemaTable(System.Data .OleDb.OleDbSchemaGuid.Columns, _
New Object() {Nothing, Nothing, "Table1"})
DataGrid1.DataSource = SchemaTable
DatabaseConnection.Close()
In addition, some properties are Access specific (such as Caption) and can only be retrieved via DAO
(or possibly not at all).
Paul ~~~
pc******@ameritech.net
Microsoft MVP (Visual Basic)