Solved

vb4 (16-bits) runtime error '20001'

Posted on 1998-01-07
5
454 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
  • 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
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…

762 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

Need Help in Real-Time?

Connect with top rated Experts

28 Experts available now in Live!

Get 1:1 Help Now