Link to home
Start Free TrialLog in
Avatar of wsm
wsm

asked on

vb4 (16-bits) runtime error '20001'

I have create an application using VB4 (16-bits)and generated a setup files using VB4 (16-bits) application setup wizard and copy those files to a disk.
Then I install that application into another pc and when
I click on AAA.exe, it will pop up a dialog that says,
"runtime error '20001' without any description.
Then I try to click on the AAA.exe again, the same runtime
error code still exist except that it will print out some garbage characters as well.

If I run this application on the development pc, there won't be any runtime error '20001'

Can anyone help me on this.
Avatar of mrmick
mrmick

Visual Basic reserves error numbers in the range of 1 - 1000 (but only currently use up to about 750.  VB control errors are 32000+

Error 20001 is a user defined error.  Could be cause by a custom control or your app if you raise any errors.

What's going on in your code when the error occurs?

Avatar of wsm

ASKER

The problem is solved when I change that pc into the
development pc. This runtime error will only occur at the non-development pc.
After tracing each line in the form load using msgbox "test",
the runtime error occur when I tried to assign the DirList.path
During Form_Load, I have assign DirList.path = c:\AAA\test
and this AAA\test directory is already created.
so, what is the problem? This DirList, is it part of the Microsoft Common Dialog (comdlg16.ocx since it is a 16 bit)?
ASKER CERTIFIED SOLUTION
Avatar of mrmick
mrmick

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
MS documentation knows three cases of runtime error 20001. Two of them are connected to Access 2 (DB engine version in VB4/16) and one to RAS service on Windows NT 3.x.

One of those concerning Access 2 also involves SQL server (actually accessing SQL server from Access Basic code), so I make a wild guess, that in your case the error code means

JET_errREPSetRepid    -20001  users can't change the rep ID

So this hints that you are replicating a database or your program thinks that you are replicating it (you can never be 100 % sure that the error reported is the actual error) and doing an illegal operation on it.

If it happens to be so that you are trying to use RAS services, then the error code means

RAS EVENT ID: 20001 SYMBOL NAME : RASLOG_CANT_LOAD_NBGATEWAY MESSAGE TEXT: Cannot load the NetBIOS gateway DLL components

So please provide some more info.




Avatar of wsm

ASKER

The application setup files was created using the VB 16 Application Setup Wizard - 16 bit.

I have tried to use InstallShield to create the setup files, but
the same runtime error '20001' still occur.

And this application is not using Access 2 (DB engine version in
VB4/16) or RAS service on Windows NT 3.x.

Any other help/hints will be grateful.