473,403 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

How to list all tables in MSAccess

I can't do it
thank
Nov 20 '05 #1
3 930
http://msdn.microsoft.com/library/de...classtopic.asp
"Research-13" <te*****@solutions-corp.co.th> wrote in message
news:MP***********************@news.microsoft.com. ..
I can't do it
thank

Nov 20 '05 #2
"Research-13" <te*****@solutions-corp.co.th> schrieb
I can't do it
thank


http://msdn.microsoft.com/library/en...asp?frame=true
--
Armin

http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
On Thu, 1 Jan 2004 02:47:02 +0700, Research-13 <te*****@solutions-corp.co.th> wrote:

¤ I can't do it
¤ thank

Try the following:

Sub ListAccessTables()

Dim AccessConnection As System.Data.OleDb.OleDbConnection
Dim AccessDataTable As DataTable

Try

AccessConnection = New
System.Data.OleDb.OleDbConnection("Provider=Micros oft.Jet.OLEDB.4.0;" & _
"Data Source=E:\My Documents\db1.mdb")

AccessConnection.Open()

AccessDataTable =
AccessConnection.GetOleDbSchemaTable(System.Data.O leDb.OleDbSchemaGuid.Tables, New Object()
{Nothing, Nothing, Nothing, "TABLE"})

DataGrid1.DataSource = AccessDataTable

Dim RowCount As Int32
Console.WriteLine(AccessDataTable.Rows.Count)
For RowCount = 0 To AccessDataTable.Rows.Count - 1
Console.WriteLine(AccessDataTable.Rows(RowCount)!T ABLE_NAME.ToString)
Next RowCount

Catch ex As Exception
MessageBox.Show(ex.Message)
Finally
AccessConnection.Close()

End Try

End Sub
Paul ~~~ pc******@ameritech.net
Microsoft MVP (Visual Basic)
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: mark | r | last post by:
im lookinf for an idiots guide to creating a product list where categories are stored in a separate table from the products table, i know how to link the data in access so the products table is...
2
by: Earl Anderson | last post by:
I recall in my Paradox days that when appending records to a table or updating records and data type conflicts or key violations were automatically placed in tables called "Problem" or "Key_Viol". ...
3
by: Mike Ridley | last post by:
I have 2 databases called (for example) "progs.mdb" and "files.mdb". Both these databases reside on computer "myserver". The progs database has links to the tables in the files database....
3
by: sea | last post by:
If a runtime installation of Access is created and installed on a client machine that has a full verion of access, will it still be possible to view the tables and queries in design view but not...
8
by: vpettes | last post by:
I am new to Access having used Filemaker for many years. My question has to do with displaying and creating a line item database. What I have is a two tables. One has Name, Location, time,...
2
by: G Gerard | last post by:
Hello I am trying to connect to a msaccess database and then create a list of the objects in that database (more specifically the tables) and then create a list of the fields (including the...
2
by: krishnasarma | last post by:
hi can any one tell me ........how to join two tables of different db(MSAccess) in Vb6 thanx in advance
1
by: sumannaidu | last post by:
Hi, There are 2 tables have been created in MSAccess with data and stored in some path (.mdb file). Ex: 1.Employee_Det 2.Dept_Det I don't know the structure of those tables.........
2
pbala
by: pbala | last post by:
Hello, I am using MSAccess 2003 Database which contains tables and some forms. I want to hide the tables and form code from some users.Only developer will going to view this. How did I hide the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.