SIMIN Posted March 15, 2008 Posted March 15, 2008 Hi forum members! :) I have a question in my mind: I want to read from an Access .mdb database file. This code works if I want to read the contents of a specific table from database: Dim StringConnection As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + FileTextBox.Text + ";Jet OLEDB:Database Password = " + PasswordTextBox.Text Dim MyConnection As New OleDbConnection(StringConnection) MyConnection.Open() Dim MyCommands As New OleDbCommand("SELECT * FROM MyTable", MyConnection) MyConnection.Close() However, I want to do a different thing! I don't know if my database has any tables or not? Perhaps it has, so I just want to get the name of all tables in database. How can I get the name of all tables in database using the above code? Thank you friends :) Quote
Machaira Posted March 17, 2008 Posted March 17, 2008 Google is your friend - http://www.mvps.org/access/queries/qry0002.htm :) Quote Here's what I'm up to.
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.