473,405 Members | 2,310 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,405 software developers and data experts.

List of databases


Is it possible to get the list of databases somewhere in Access, for
example
module, or form?
I can create a text file with a code like that:
Dim CheckFile As String
CheckFile = Dir("C:\be\*.mdb")
Do Until CheckFile = ""
Open "C:\BE\FileList.txt" For Append As #1
Print #1, CheckFile
Close #1
CheckFile = Dir
Loop

Is it possible to get this information somehow in Access ?


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #1
2 1683
> Dim CheckFile As String
CheckFile = Dir("C:\be\*.mdb")
Open "C:\BE\FileList.txt" For Append As #1
Do Until CheckFile = ""
Print #1, CheckFile
CheckFile = Dir
Loop
Close #1
The modified code above does not close then re-open the file every loop.

It should be possible to import the file generated by the code into a table,
look up "Import" in help

P
"Peter yeshew" <fr*******@abv.bg> wrote in message
news:3f*********************@news.frii.net...
Is it possible to get the list of databases somewhere in Access, for
example
module, or form?
I can create a text file with a code like that:
Dim CheckFile As String
CheckFile = Dir("C:\be\*.mdb")
Do Until CheckFile = ""
Open "C:\BE\FileList.txt" For Append As #1
Print #1, CheckFile
Close #1
CheckFile = Dir
Loop

Is it possible to get this information somehow in Access ?


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #2
http://www.mvps.org/access/api/api0001.htm contains code, donated by Ken
Getz, to directly use the Windows Common Dialog to allow a user to choose
path and file.

You can save the return values from Dir in an Access array or in an Access
table, as well as in a file as you illustrate.

Other than that, you'd need to clarify what you want to do.

Larry Linson
Microsoft Access MVP

"Peter yeshew" <fr*******@abv.bg> wrote in message
news:3f*********************@news.frii.net...

Is it possible to get the list of databases somewhere in Access, for
example
module, or form?
I can create a text file with a code like that:
Dim CheckFile As String
CheckFile = Dir("C:\be\*.mdb")
Do Until CheckFile = ""
Open "C:\BE\FileList.txt" For Append As #1
Print #1, CheckFile
Close #1
CheckFile = Dir
Loop

Is it possible to get this information somehow in Access ?


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Nov 12 '05 #3

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

Similar topics

7
by: _AnonCoward | last post by:
I have MSDE running on my system and I want to get a list of databases for that server programmatically. I'm using vb.net and I want to view, add, delete and modify databases on a server from...
3
by: Amit | last post by:
Hi when I try to run LIST ACTIVE DATABASES AT DBPARTITIONNUM <partnum> or LIST ACTIVE DATABASES GLOBAL, I always get an error message. Does anyone know why? I'm on v8 fp 5 output : db2 => list...
11
by: Chuck | last post by:
Is there a command that will list all of the databases for a particular instance on the local machine, whether they are activated or not? If there is no such command, is there at least a way to...
1
by: Byrocat | last post by:
These particular servers do not have the DAS enabled, so I have to document the contents of the instances, initially "instance X contains n databases (A, B, C< ....)") I can get get list of...
0
by: Miguelito Bain | last post by:
hi everybody- i've got a conundrum... i inherited some old databases, and i'm trying to convert them. i run office xp with access 2002, and all of the databases i manage are either in 97...
6
by: Reza Alirezaei | last post by:
How can I have a list of all sql servers avaiable on our LAN populated in a DropDownList exacly like what we have when we want to specify Datasource in ADO.Net or wherever? Thanks
0
by: Mike Cox | last post by:
Andy M wrote: > ALERT > > There is a person by the name of Mike Cox who's trying > to turn this mailing list into a Big-8 newsgroup. No, I'm trying to get teh postgresql groups which are...
2
by: Troels Arvin | last post by:
Hello, I need a way to list an instance's databases, in a way which is easy to parse (I can't count on perl or similar scripting tools to be available everywhere). I know of the 'db2 list...
1
by: SkyGringo | last post by:
Hi, I'm using the 64-bit version of SQL Server 2005, SP2, on Windows Server 2003 R2 X64 Enterprise Edition. I've got a bunch of users out there who are the db_owner, db_accessadmin and...
4
by: Erwin Leonardi | last post by:
Hi there, Suppose computer PC1 is my database server in which DB2 is running. I have an application running in computer PC2. The application PC2 will connect to DB2 in PC2. How can my...
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:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.