Does anyone know how to start LDB_Viewer (LDBView.exe) from a batch file so it automatically loads a particular Database?

Does anyone know how to start LDB_Viewer (LDBView.exe) from a batch file so it automatically loads a particular Database?

I tried the .bat below and it doesn't do the job.

D:\Access10\LDBView.exe  D:\Access10\Develop\My_MDB.mdb

Thanks in advance for any help.
LJG
LVL 2
LJGAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PatHartmanCommented:
Modify the database to add a macro.  When you open the database using the macro name, have the macro take the file name argument and open the form to that file.
0
LJGAuthor Commented:
Pat
Thanks for the reply, but I don't think you understand.

There is a program from Microsoft (LDBView.exe) that allows you to look at the .ldb  file

I would like to start the above program (LDBView.exe) with a batch file that loaded my file  aaa-bmp.bmpD:\Access10\Develop\My_MDB.mdb
0
Jeffrey CoachmanMIS LiasonCommented:
You did not state where LDBView.exe is located..

But you can try something like this batch file as a start...

rem Isert the actual path to LDBView.exe in the line below
C:\Windows\system32\LDBView.exe D:\Access10\Develop\My_MDB.mdb

Open in new window


(Name the file: test.bat)

This batch file worked fine for opening a picture in msPaint:
C:\Windows\system32\mspaint.exe C:\Users\owner\Pictures\test.png

Open in new window

0
Acronis True Image 2019 just released!

Create a reliable backup. Make sure you always have dependable copies of your data so you can restore your entire system or individual files.

Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
There's no way to do that as the LDB viewer does not accept a parameter from the command line.

But there are numerous utilities floating around that will give you the same information and most are written in Access itself using the jet show user roster function.

For older Access Versions there is also a .dll that provides the same functionality.

I'm not in the office at the moment but tomorrow I can post a couple of utilities that will give you this information and you can control programmatically.

Jim
0
PatHartmanCommented:
Sorry LJG, I thought you were using one of the Access apps that Jim mentioned.

If an application isn't written to support a runtime argument, there isn't anything you can do about it.  Either open the database after you open the app or find one of the Access versions that you can modify yourself.
0
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
So here's one such utility:

FrankHilton_AccessLDBSetup.jpg

  This uses a DB to record what you want to monitor, so it would get you around your problem.   It uses the JET SHOW USER ROSTER function in ADO to get the list of users.  This is the basic code in it:

https://support.microsoft.com/en-us/help/285822/how-to-determine-who-is-logged-on-to-a-database-by-using-microsoft-jet

There is optionally the ability to use the MSLDBUSR.DLL, which you can use with older versions and since it's a DLL call, you don't have to use ADO.

 and here's another utility, which you could modify to suite your needs (Frank's above is compiled with no source):

http://access.mvps.org/access/modules/mdl0055.htm

 Again, I believe it has both methods built-in.

Jim.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
Just one other note; you'll need to use the show user roster function on JET 4.0 and later, which in today's times, is just about everything.

 The .DLL only worked up to JET 3.5.

Jim.
0
Jim Dettman (Microsoft MVP/ EE MVE)President / OwnerCommented:
One other thing; there are many utilities that read the .LDB file directly as it's nothing more than a text file, with a 255 array of 64 byte entries (32 bytes for the username, and 32 bytes for the machine name).

 You can do that if you want, but understand that it is not 100% perfect in all cases.    Besides the entry in the .LDB, there is also a user lock that is placed when you connect to a DB.

 That lock is what tells you the user is active, and you won't see that lock looking at the LDB file itself on disk.

 In the past, that was more of a problem as JET would often leave "phantom" users in the .LDB, but with recent versions, I haven't seen that.    If a non-active user is in the .LDB, it's really because they corrupted the DB (JET will not clear a LDB entry if a user corrupts the DB so you can tell who did).

 Finally, all users in the LDB file will be listed as "admin" as the user name is not the network login, but the username being used for the DB login.

Jim.
0
LJGAuthor Commented:
Jim
Thanks so much for all the info.  I'll put it together and hopefully have a good solution by the end of the week.

Thanks again
LJG
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Batch

From novice to tech pro — start learning today.