?
Solved

vb4 (16-bits) runtime error '20001'

Posted on 1998-01-07
5
Medium Priority
?
476 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

770 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