I'm trying to compact an access database from a vbs script with the
following code:

Set objAccess = CreateObject("Access.Application.11")
objAccess.DbEngine.CompactDatabase strDB, strTempDB
Set objScript= CreateObject("Scripting.FileSystemObject")
objScript.CopyFile strTempDB, strDB, True
objScript.DeleteFile strTempDB

It worked great while I executed it in my Windows XP, but from the moment
it's running on a Windows 2003 Server, I get a 424 error (Object required)
most of the times (not always)... What could be the cause??

Thank you in advance !!

Bernardo Achirica Rodriguez
IBERIA L.A.E. - Dirección de Sistemas
Subdirec. Producción / U. Producción Red
Tfno. +34 91 587 56 72
bachirica [at] iberia [dot] es

Re: Error compacting access database by Ray

Ray
Tue Jul 11 07:32:25 CDT 2006

On what line does the error occur?

Do you have Access installed on the machine you're running this on?

Ray at work

"Bernardo Achirica" <me@privacy.net> wrote in message
news:OA1bmPNpGHA.3936@TK2MSFTNGP04.phx.gbl...
> I'm trying to compact an access database from a vbs script with the
> following code:
>
> Set objAccess = CreateObject("Access.Application.11")
> objAccess.DbEngine.CompactDatabase strDB, strTempDB
> Set objScript= CreateObject("Scripting.FileSystemObject")
> objScript.CopyFile strTempDB, strDB, True
> objScript.DeleteFile strTempDB
>
> It worked great while I executed it in my Windows XP, but from the moment
> it's running on a Windows 2003 Server, I get a 424 error (Object required)
> most of the times (not always)... What could be the cause??
>
> Thank you in advance !!
>
> Bernardo Achirica Rodriguez
> IBERIA L.A.E. - Dirección de Sistemas
> Subdirec. Producción / U. Producción Red
> Tfno. +34 91 587 56 72
> bachirica [at] iberia [dot] es
>



Re: Error compacting access database by Bernardo

Bernardo
Tue Jul 11 07:39:09 CDT 2006

It gives the error in the line where it compacts the database
(objAccess.DbEngine.CompactDatabase strDB, strTempDB)

And yes, Access 2003 is installed in the server... it works sometimes, but
most of the times I get that error and that's what's driving me crazy !! :-(


"Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
message news:%23iRCSYOpGHA.2464@TK2MSFTNGP03.phx.gbl...
> On what line does the error occur?
>
> Do you have Access installed on the machine you're running this on?
>
> Ray at work
>
> "Bernardo Achirica" <me@privacy.net> wrote in message
> news:OA1bmPNpGHA.3936@TK2MSFTNGP04.phx.gbl...
>> I'm trying to compact an access database from a vbs script with the
>> following code:
>>
>> Set objAccess = CreateObject("Access.Application.11")
>> objAccess.DbEngine.CompactDatabase strDB, strTempDB
>> Set objScript= CreateObject("Scripting.FileSystemObject")
>> objScript.CopyFile strTempDB, strDB, True
>> objScript.DeleteFile strTempDB
>>
>> It worked great while I executed it in my Windows XP, but from the moment
>> it's running on a Windows 2003 Server, I get a 424 error (Object
>> required) most of the times (not always)... What could be the cause??
>>
>> Thank you in advance !!
>>
>> Bernardo Achirica Rodriguez
>> IBERIA L.A.E. - Dirección de Sistemas
>> Subdirec. Producción / U. Producción Red
>> Tfno. +34 91 587 56 72
>> bachirica [at] iberia [dot] es
>>
>
>



Re: Error compacting access database by Walter

Walter
Tue Jul 11 12:23:39 CDT 2006

Access is making a call to DAO to compact the database, so I would make sure
that the latest version of Jet is installed on the machine.

http://www.microsoft.com/downloads/details.aspx?FamilyID=97bc8126-5c60-44bc-a2ce-1e40c7fe2b34&DisplayLang=en

"Bernardo Achirica" <me@privacy.net> wrote in message
news:ee2q%23bOpGHA.148@TK2MSFTNGP04.phx.gbl...
> It gives the error in the line where it compacts the database
> (objAccess.DbEngine.CompactDatabase strDB, strTempDB)
>
> And yes, Access 2003 is installed in the server... it works sometimes, but
> most of the times I get that error and that's what's driving me crazy !!
> :-(
>
>
> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
> message news:%23iRCSYOpGHA.2464@TK2MSFTNGP03.phx.gbl...
>> On what line does the error occur?
>>
>> Do you have Access installed on the machine you're running this on?
>>
>> Ray at work
>>
>> "Bernardo Achirica" <me@privacy.net> wrote in message
>> news:OA1bmPNpGHA.3936@TK2MSFTNGP04.phx.gbl...
>>> I'm trying to compact an access database from a vbs script with the
>>> following code:
>>>
>>> Set objAccess = CreateObject("Access.Application.11")
>>> objAccess.DbEngine.CompactDatabase strDB, strTempDB
>>> Set objScript= CreateObject("Scripting.FileSystemObject")
>>> objScript.CopyFile strTempDB, strDB, True
>>> objScript.DeleteFile strTempDB
>>>
>>> It worked great while I executed it in my Windows XP, but from the
>>> moment it's running on a Windows 2003 Server, I get a 424 error (Object
>>> required) most of the times (not always)... What could be the cause??
>>>
>>> Thank you in advance !!
>>>
>>> Bernardo Achirica Rodriguez
>>> IBERIA L.A.E. - Dirección de Sistemas
>>> Subdirec. Producción / U. Producción Red
>>> Tfno. +34 91 587 56 72
>>> bachirica [at] iberia [dot] es
>>>
>>
>>
>
>



Re: Error compacting access database by Bernardo

Bernardo
Tue Jul 11 14:22:28 CDT 2006

That shoudn't be the problem... that update to the Jet engine is superseeded
by the SP1 of Windows 2003, and this machine is up to date with every
available patch...


--
Bernardo Achirica Rodriguez
IBERIA L.A.E. - Dirección de Sistemas
Subdirec. Producción / U. Producción Red
Tfno. +34 91 587 56 72
bachirica [at] iberia [dot] es


"Walter Zackery" <please_respond_to@group.com> wrote in message
news:uSru$6QpGHA.4192@TK2MSFTNGP03.phx.gbl...
> Access is making a call to DAO to compact the database, so I would make
> sure that the latest version of Jet is installed on the machine.
>
> http://www.microsoft.com/downloads/details.aspx?FamilyID=97bc8126-5c60-44bc-a2ce-1e40c7fe2b34&DisplayLang=en
>
> "Bernardo Achirica" <me@privacy.net> wrote in message
> news:ee2q%23bOpGHA.148@TK2MSFTNGP04.phx.gbl...
>> It gives the error in the line where it compacts the database
>> (objAccess.DbEngine.CompactDatabase strDB, strTempDB)
>>
>> And yes, Access 2003 is installed in the server... it works sometimes,
>> but most of the times I get that error and that's what's driving me crazy
>> !! :-(
>>
>>
>> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
>> message news:%23iRCSYOpGHA.2464@TK2MSFTNGP03.phx.gbl...
>>> On what line does the error occur?
>>>
>>> Do you have Access installed on the machine you're running this on?
>>>
>>> Ray at work
>>>
>>> "Bernardo Achirica" <me@privacy.net> wrote in message
>>> news:OA1bmPNpGHA.3936@TK2MSFTNGP04.phx.gbl...
>>>> I'm trying to compact an access database from a vbs script with the
>>>> following code:
>>>>
>>>> Set objAccess = CreateObject("Access.Application.11")
>>>> objAccess.DbEngine.CompactDatabase strDB, strTempDB
>>>> Set objScript= CreateObject("Scripting.FileSystemObject")
>>>> objScript.CopyFile strTempDB, strDB, True
>>>> objScript.DeleteFile strTempDB
>>>>
>>>> It worked great while I executed it in my Windows XP, but from the
>>>> moment it's running on a Windows 2003 Server, I get a 424 error (Object
>>>> required) most of the times (not always)... What could be the cause??
>>>>
>>>> Thank you in advance !!
>>>>
>>>> Bernardo Achirica Rodriguez
>>>> IBERIA L.A.E. - Dirección de Sistemas
>>>> Subdirec. Producción / U. Producción Red
>>>> Tfno. +34 91 587 56 72
>>>> bachirica [at] iberia [dot] es
>>>>
>>>
>>>
>>
>>
>
>



Re: Error compacting access database by Alex

Alex
Tue Jul 11 19:09:10 CDT 2006

This is a VERY wild guess, but it might be that this error crops up when you
are attempting to compact a database that still has open handles. Normally I
would expect it to throw a 0x800A0D1C error explicitly saying you're trying
to open a database opened by another user. I can't test in a server
environment with net connections right now, so I can't rule this in or out.

One thing that _might_ help - it will make the code slightly faster and less
complex - is to access DAO directly rather than stepping through Access. I
don't think this is going to fix your problem or even make the error message
any better, though.

To use DAO directly, use this:
Set dao = CreateObject("DAO.DBEngine.36")
dao.CompactDatabase strDB, strTempDB

"Bernardo Achirica" <me@privacy.net> wrote in message
news:%23lHRy9RpGHA.4192@TK2MSFTNGP03.phx.gbl...
> That shoudn't be the problem... that update to the Jet engine is
> superseeded by the SP1 of Windows 2003, and this machine is up to date
> with every available patch...
>
>
> --
> Bernardo Achirica Rodriguez
> IBERIA L.A.E. - Dirección de Sistemas
> Subdirec. Producción / U. Producción Red
> Tfno. +34 91 587 56 72
> bachirica [at] iberia [dot] es
>
>
> "Walter Zackery" <please_respond_to@group.com> wrote in message
> news:uSru$6QpGHA.4192@TK2MSFTNGP03.phx.gbl...
>> Access is making a call to DAO to compact the database, so I would make
>> sure that the latest version of Jet is installed on the machine.
>>
>> http://www.microsoft.com/downloads/details.aspx?FamilyID=97bc8126-5c60-44bc-a2ce-1e40c7fe2b34&DisplayLang=en
>>
>> "Bernardo Achirica" <me@privacy.net> wrote in message
>> news:ee2q%23bOpGHA.148@TK2MSFTNGP04.phx.gbl...
>>> It gives the error in the line where it compacts the database
>>> (objAccess.DbEngine.CompactDatabase strDB, strTempDB)
>>>
>>> And yes, Access 2003 is installed in the server... it works sometimes,
>>> but most of the times I get that error and that's what's driving me
>>> crazy !! :-(
>>>
>>>
>>> "Ray Costanzo [MVP]" <my first name at lane 34 dot commercial> wrote in
>>> message news:%23iRCSYOpGHA.2464@TK2MSFTNGP03.phx.gbl...
>>>> On what line does the error occur?
>>>>
>>>> Do you have Access installed on the machine you're running this on?
>>>>
>>>> Ray at work
>>>>
>>>> "Bernardo Achirica" <me@privacy.net> wrote in message
>>>> news:OA1bmPNpGHA.3936@TK2MSFTNGP04.phx.gbl...
>>>>> I'm trying to compact an access database from a vbs script with the
>>>>> following code:
>>>>>
>>>>> Set objAccess = CreateObject("Access.Application.11")
>>>>> objAccess.DbEngine.CompactDatabase strDB, strTempDB
>>>>> Set objScript= CreateObject("Scripting.FileSystemObject")
>>>>> objScript.CopyFile strTempDB, strDB, True
>>>>> objScript.DeleteFile strTempDB
>>>>>
>>>>> It worked great while I executed it in my Windows XP, but from the
>>>>> moment it's running on a Windows 2003 Server, I get a 424 error
>>>>> (Object required) most of the times (not always)... What could be the
>>>>> cause??
>>>>>
>>>>> Thank you in advance !!
>>>>>
>>>>> Bernardo Achirica Rodriguez
>>>>> IBERIA L.A.E. - Dirección de Sistemas
>>>>> Subdirec. Producción / U. Producción Red
>>>>> Tfno. +34 91 587 56 72
>>>>> bachirica [at] iberia [dot] es
>>>>>
>>>>
>>>>
>>>
>>>
>>
>>
>
>