Solved

vb4 (16-bits) runtime error '20001'

Posted on 1998-01-07
5
472 Views
Last Modified: 2013-11-14
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.
0
Comment
Question by:wsm
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 8

Expert Comment

by:mrmick
ID: 1449828
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?

0
 

Author Comment

by:wsm
ID: 1449829
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)?
0
 
LVL 8

Accepted Solution

by:
mrmick earned 200 total points
ID: 1449830
Create a new installable program using the application setup wizard and install the program on the new machine.  DirList is not part of the comdlg control.  You most likely missing missing required files.
0
 
LVL 4

Expert Comment

by:rantanen
ID: 1449831
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.




0
 

Author Comment

by:wsm
ID: 1449832
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.
0

Featured Post

MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you don't know how to downgrade, my instructions below should be helpful.
Create a Windows 10 custom Image with custom task bar and custom start menu using XML for deployment.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

717 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question