From: jodleren on
Hello

I keep on getting this error:

Microsoft VBScript runtime error '800a01fb'
An exception occurred: 'ActionDZ'
/modules/jotfileorder/jotfileorder_request_process.asp, line 190

This line causes the problem
ZIPObject.ActionDZ = 4 'DynaZip component

It happens most of the time, but not always. The component is in use
before this line, so the component is created, and probably works.
We can avoid the error be reinstalling an old copy of the file, but
chaning a SQL query, which is not even related to this, we get this
error. Restoring the query does not solve the problem :)

I have been working on this for 3 days, and now the idea is to jump
over. How should this code look like?

on error resume errorstate
ZIPObject.ActionDZ = 4 'DynaZip component
ok=true
goto all ok
errorstate
ok=true
all ok
reset on error... - how?
if ok then.....

WBR
Sonnich
From: Bob Barrows on
jodleren wrote:
> Hello
>
> I keep on getting this error:
>
> Microsoft VBScript runtime error '800a01fb'
> An exception occurred: 'ActionDZ'
> /modules/jotfileorder/jotfileorder_request_process.asp, line 190
>
> This line causes the problem
> ZIPObject.ActionDZ = 4 'DynaZip component
>
> It happens most of the time, but not always. The component is in use
> before this line, so the component is created, and probably works.
> We can avoid the error be reinstalling an old copy of the file, but
> chaning a SQL query, which is not even related to this, we get this
> error. Restoring the query does not solve the problem :)
>
> I have been working on this for 3 days, and now the idea is to jump
> over. How should this code look like?
>
> on error resume errorstate

This is not possible in vbscript. The only two acceptable variations
are:

on error resume next 'turns on error-handling
on error goto 0 'turns off error-handling

> ZIPObject.ActionDZ = 4 'DynaZip component
> ok=true
> goto all ok
> errorstate
> ok=true
> all ok
> reset on error... - how?
> if ok then.....
>

on error resume next
ZIPObject.ActionDZ = 4 'DynaZip component
if err<> 0 then
'handle the error
else
'do the stuff needed if no error had occurred
'you maight wish to turn off error-handling here
end if


--
HTH,
Bob Barrows


From: jodleren on
On Oct 30, 2:47 pm, "Bob Barrows" <reb01...(a)NOyahoo.SPAMcom> wrote:
> jodleren wrote:
> > Hello
>
> > I keep on getting this error:
>
> > Microsoft VBScript runtime error '800a01fb'
> > An exception occurred: 'ActionDZ'
> > /modules/jotfileorder/jotfileorder_request_process.asp, line 190
>
> > This line causes the problem
> >        ZIPObject.ActionDZ = 4  'DynaZip component
>
> > It happens most of the time, but not always. The component is in use
> > before this line, so the component is created, and probably works.
> > We can avoid the error be reinstalling an old copy of the file, but
> > chaning a SQL query, which is not even related to this, we get this
> > error. Restoring the query does not solve the problem :)
>
> > I have been working on this for 3 days, and now the idea is to jump
> > over. How should this code look like?
>
> > on error resume errorstate
>
> This is not possible in vbscript. The only two acceptable variations
> are:
>
> on error resume next    'turns on error-handling
> on error goto 0             'turns off error-handling
>
> >        ZIPObject.ActionDZ = 4  'DynaZip component
> >      ok=true
> >         goto all ok
> > errorstate
> >      ok=true
> > all ok
> > reset on error... - how?
> >   if ok then.....
>
> on error resume next
> ZIPObject.ActionDZ = 4  'DynaZip component
> if err<> 0 then

Where do I get the "err" from?
>     'handle the error
> else
>     'do the stuff needed if no error had occurred
>     'you maight wish to turn off error-handling here

- How?

> end if

These are new things to me

WBR
Sonnich
From: Bob Barrows on
jodleren wrote:
>>
>> on error resume next
>> ZIPObject.ActionDZ = 4 'DynaZip component
>> if err<> 0 then
>
> Where do I get the "err" from?

It's a builtin object that contains the error number generated by the
last statement that was executed.

>> 'handle the error
>> else
>> 'do the stuff needed if no error had occurred
>> 'you might wish to turn off error-handling here
>
> - How?
>

"How" what? How to turn off error-handling? I explained earlier in my
first reply ...
> on error goto 0 'turns off error-handling

The thing is, you have to stop thinking in terms of goto. The idea is to
turn on error-handling, attempt to execute a statement, then immediately
check the err object to see if an error occurred. The model looks like:

<bunch of statements whose errors>
<you want to be handled by the vbscript runtime engine>
on error resume next 'turn on error-handling
<statement whose error you want to handle yourself>
if err <> 0 then
<handle the error, possibly by >
<displaying the error to the user and then >
<exiting the procedure - up to you>
end if
on error goto 0 'turn off error-handling
<bunch of statements whose errors>
<you want to be handled by the vbscript runtime engine>

It sounds as if you need the vbscript documentation. You can download it
from here:
http://www.microsoft.com/downloads/details.aspx?FamilyID=01592c48-207d-4be1-8a76-1c4099d7bbb9&DisplayLang=en

--
HTH,
Bob Barrows