 |
| Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA. |
Welcome to the p2p.wrox.com Forums.
You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
|
|
|
|

September 22nd, 2004, 02:27 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
|
|
To Catch a User
I have an Access XP database that links to two dBase III files on the network that people enter data into (yes, I know it's archaic and it's being updated to SQL server as we speak). The users enter the DBF data through a Clipper 5.0 front end created about ten years ago.
There are times when I need to know exactly who has the DBF table open so I can ask him/her to close it to perform some maintenance. I rewrote the Clipper front end to deposit the person's network User ID into a table that I can read, but sometimes it doesn't catch it.
Is there another way I can tell who has a linked DBF table open using VBA code?
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
__________________
Greg Serrano
Michigan Dept. of Environmental Quality
Air Quality Division
|
|

September 22nd, 2004, 09:14 PM
|
|
Friend of Wrox
|
|
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
|
|

September 23rd, 2004, 11:50 AM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
|
|
Thanks. I'll look into that, but I noticed their example uses Northwind.mdb to track. Will it work if the file in question is a DBF file instead, i.e. NOT Access?
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|
|

September 23rd, 2004, 12:09 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
|
|
It doesn't work on a linked DBF file. It says "Unrecognized database format".
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|
|

September 23rd, 2004, 01:28 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
|
|
I'm assuming that I must give the provider for the DBF file. It's NOT
cn.Provider = "Microsoft.Jet.OLEDB.4.0"
It'd be something else, but I have no idea what to put there for DBF files.
Also, I'd need to put something in the SchemaID argument for this
Set rs = cn.OpenSchema(adSchemaProviderSpecific, _
, "{947bb102-5d43-11d1-bdbf-00c04fb92675}")
I have no idea where that long ID came from let alone what it would be for a linked DBF File.
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|
|

September 23rd, 2004, 02:35 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
|
|
Getting closer. The Provider info can be the same, but the OPEN line must be this
cn.Open "Data Source=C:\TEST1\COUNTYAL\PERMIT_L.DBF;Extended Properties=dBase 3.0;"
However, now I get the error message
"Could not find installable ISAM".
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|
|

September 23rd, 2004, 03:52 PM
|
|
Friend of Wrox
|
|
Join Date: Jun 2003
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
|
|
I followed the steps to correct "Could not find installable ISAM" and it didn't work. So I decided to use 5.0 instead of 3.0 in my extended properties and the error disappeared. I also tweaked the OPEN statement and now get one of two errors. If I use this
cn.Open "Data Source=C:\TEST1\COUNTYAL;File Name=PERMIT_L.DBF;Extended Properties=dBase 5.0"
The error is this
"Run-time Error '432': File name or class name not found during Automation operation"
If I use this
cn.Open "Data Source=C:\TEST1\COUNTYAL;File Name=C:\TEST1\COUNTYAL\PERMIT_L.DBF;Extended Properties=dBase 5.0"
The error is this
"Run-time error '-2147286789 (800300fb)': The file %1 is not a valid compound file."
The key (it seems to the untrained eye :)) is to get this OPEN statement syntax EXACTLY right. Any ideas?
Greg Serrano
Michigan Dept. of Environmental Quality, Air Quality Division
|
|

September 23rd, 2004, 04:09 PM
|
|
Friend of Wrox
|
|
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
I will look into this and try to figure it out.
|
|

October 3rd, 2004, 05:16 PM
|
|
Registered User
|
|
Join Date: Oct 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
|
|
God, I feel like such an infant here due to the lack of knowledge when it comes to any of these dbase files, wished I could help, but useless here, found this site by accident when looking for windows 98 second edtion free downloads, the funny thing is, now that I'm here, I still havent found it, if that tells you anything, I'm yet in need of finding my way around this site, but thought I'd drop by to see what the catch a usser was all about, and leave a post saying hi to everyone, didn't notice a newby section, so this was the next best thing, forgive me for having a blond moment...lol!
Thanx
Briana
Bri
|
Similar Threads
|
| Thread |
Thread Starter |
Forum |
Replies |
Last Post |
| Try...Catch |
lowell |
VB.NET |
3 |
July 23rd, 2007 06:35 AM |
| Try Catch not working?? |
dparsons |
ASP.NET 1.0 and 1.1 Professional |
3 |
September 18th, 2006 06:54 PM |
| Try and Catch? |
mujju |
PHP How-To |
2 |
January 20th, 2005 12:27 PM |
| Catch Problem |
dag |
VB.NET 2002/2003 Basics |
1 |
December 8th, 2003 09:28 PM |
| How to catch error. |
lancet2003 |
BOOK: Beginning PHP4/PHP 5 ISBN: 978-0-7645-4364-7; v5 ISBN: 978-0-7645-5783-5 |
1 |
December 3rd, 2003 02:16 PM |
|
 |