Most excellent, Bob. Thankyouthankyouthankyou, that's exactly it. May I ask
where you found this?
And no, it's not anything like you describe. It's several copies of a
single-machine, single-user, mostly read-only database, running on various
computers in a library department. I want the copies to occasionally
interrogate the master copy, but in a very non-intrusive way. The master
machine may be shut down (it's not a server), or the db in use and I don't
want the users being pestered with error messages, or to have to wait for
timeouts. The intention here is for the db copies to spawn an invisible
script process that quietly checks for certain conditions in the master
copy, and only if all conditions are met, does it inform the user that a
newer version is available and ask if it should be copied over. And a
maximum of once per day - I don't want the users to be pestered by this
dialog every time they start the db to look up something. If the proper
conditions do not exist, or if the update dialog has already been dismissed
once that day, the script process will simply close and the user should
never even know that such an event took place. The data are not
mission-critical or time-sensitive in any way - an update of once or twice
per month should be more than adequate.
Pete
"Bob Barrows" <reb01501@newsgroup> píše v diskusním příspěvku
news:ug20oTxjKHA.1824@newsgroup
> Petr Danes wrote:
>> I use the following code in VBA in an Access database to retrieve a
>> custom database property:
>>
>> currentdb.Containers(1).Documents("Uzivatelske").Properties("Version")
>>
>> I would like to get this value via VBScript without opening the
>> database. I have found many tutorials and examples on how to retrieve
>> values form tables, but this is different and none of my attempts
>> have met with any success. I have tried connections, >
> You mean ADO connections? That will not work. This collection is not
> available for ADO
>
>> objAcc.OpenCurrentDatabase >
> No that won't help. You need to use DAO. Start by creating an instance
> of the DBEngine:
>
> Set DE = CreateObject("DAO.DBEngine.36")
>
> Then open your database:
> Set db = DE.OpenDatabase("C:\Program Files\Microsoft" & _
> "Office\Office\Samples\Northwind.mdb")
>
> Then go after the collection:
> msgbox db.Containers(1).Documents("Uzivatelske").Properties("Version")
>
> PS. I hope you are not doing this in ASP server-side code. DAO is
> single-threaded so it will make your ASP application thread-bound,
> impairing performance. Unfortunately, DAO is the only way to get at
> those properties.
>
> --
> HTH,
> Bob Barrows
>
>
>