|
-
Mar 7th, 2004, 06:05 AM
#1
Thread Starter
Fanatic Member
Access database Column names
Hey all, is there a way to return all the column names from an access table, i can do it in SQL by using the masters sp_columnnames stored proc, however for this project were using a access database
I am curretly building a defect management system for software and web developers,
If you wana try it out (beta test) and keep it for free just send me a message
-
Mar 7th, 2004, 09:38 AM
#2
Sleep mode
After initializing the connection obj and datast , and oleadapter , do it this way :
VB Code:
Dim adp As New OleDbDataAdapter
Dim ds As New DataSet
adp.Fill(ds, "YourTableName")
Dim ColumnCount = ds.Tables("YourTableName").Columns.Count
For i As Integer = 0 To ColumnCount
MessageBox.Show(ds.Tables("YourTableName").Columns(i).ToString)
Next
-
Mar 8th, 2004, 08:52 AM
#3
Frenzied Member
MySql has a command SHOW COLUMNS, but don't think Access has an equivalent.
-
Mar 8th, 2004, 07:02 PM
#4
Sleep mode
If I'm not wrong , there is another way to get column names by Table Schema .
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|