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.

 All Forums
 Other Forums
 MS Access
 Get table list

Author  Topic 

Rbear
Starting Member

3 Posts

Posted - 2007-06-22 : 11:38:50
Hello,i'm making a program in C# but i'm working with mdb in there.
Anyway, i know that this isn't the proper place to ask about mdb but i'm totally down and don't have any idea how to do this.
This command should get all table names in my database with use of SQL commands and put them into combobox.
the command is:

string strOleDb;
strOleDb = @"Provider=Microsoft.Jet.OLEDB.4.0;DataSource="
+Application.StartupPath + "\\mipws.mdb";
OleDbConnection conn = new OleDbConnection(strOleDb);
conn.Open();
///////////////////////////
here i'm stuck with ComboBox that should get the list of all table names in my database
///////////////////////////
conn.Close();

Anyone can help me here?

...And Justice For All...

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-06-22 : 11:44:32
since this is an access question i'm moving this to access forum.

will this be helpfull?
http://en.allexperts.com/q/Using-MS-Access-1440/Table-Names-etc.htm

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
Go to Top of Page

nr
SQLTeam MVY

12543 Posts

Posted - 2007-06-22 : 12:03:42
Here's a VB project to do it using openschema (which should work for most databases) - should be easy to convert to c#.
http://www.nigelrivett.net/VB/ADOScema.html

==========================================
Cursors are useful if you don't know sql.
DTS can be used in a similar way.
Beer is not cold and it isn't fizzy.
Go to Top of Page

Rbear
Starting Member

3 Posts

Posted - 2007-06-22 : 12:22:35
tnx, i will try to convert this to C# code.
P.S.
This is gonna be a very hard work since i started to learn C#
only a few months ago and still didn't worked with "heavy
artillery".

...And Justice For All...
Go to Top of Page
   

- Advertisement -