Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
david_reinjal
Starting Member
36 Posts |
Posted - 2007-07-06 : 08:55:46
|
hi guys,as you have information_schema in sql, i need it in ms access. can anybody help in that?Thanks,David |
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-07-06 : 09:38:28
|
I don't think there is such a thing in Access. however, you can get at something like it if you connect via oledb and then use this method: OleDbConnection.GetOleDbSchemaTable. google that and you'll find some stuff. or just check out the app in my sig - it will show you how your access db is laid out in a GUI. elsasoft.org |
 |
|
david_reinjal
Starting Member
36 Posts |
Posted - 2007-07-07 : 00:37:16
|
i am using this code: dim myConn as oledbConnection = new oledbConnection(strAccessConn) dim strRes as string()= new string {Nothing,Nothing,Nothing,"TABLE"} myconn.open() dim dt as dataTable=myConn.GetSchema("Tables",strRes) me.DataGridView1.datasource=dt myconn.close() but this shows all information about the table. all i need is just table_name. how do i do it? |
 |
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2007-07-07 : 03:58:11
|
just loop through the rows of the DataTable and load the column containing the table name into a List<string> or whatever other collection you like. elsasoft.org |
 |
|
pootle_flump
1064 Posts |
Posted - 2007-07-07 : 05:10:00
|
You can get the list of tables in Access be querying the Name field of the MSysObjects table where type = 1. This will bring up the system and user tables but all system tables start MSys. |
 |
|
|
|
|