Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unexpected Error Why????? 2

Status
Not open for further replies.

quaked2023

Technical User
Jan 22, 2004
105
MX
Hello!:

I have a problem with a program i wrote... it runs great in my pc, but i installed it on my friend's pc, and it sends me an error that says: Unexpected Error, and that's it, i've installed the vb6.0 runtimes files, and a dll (because i used a database on the program) but i still doesn't run... any ideas????? Please help me

thank you
 
Do you have an error trap that gives that message or does it come from VB? Add an error trap in the main form and display the error number and description.

Also, did you register the dll files the program uses?

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
Hi ArtieChoke:

The Error comes from vb (form the .exe)
And what do you mean about registering the dll files??
I only installed the dll in the system folder with copy - paste

Thanx for the reply
 
If the dll file is to support something you have a reference to in your program (see Project|References section in the IDE), like DAO or ADO, it must be registered on the system for the program to run. What dll file(s) are you using?

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
Hi quaked,

Just to add to what ArtieChoke has written.....you have to use this command in the Start->Run to register a dll

regsvr32 C:\windows\system\whateveryourdllname.dll (system files path will be different if u are using NT based machines)

mere copy pastinga dll doesn't work.

If you have to unregister a dll you have to use the flag -u after regsvr32 in the above command. Hope this helps. Also as Artie suggested trap the error in your code....u can use the following in your error handlers
' Save the Error Info.
lErrorNumber = Err.Number
sErrorSource = Err.Source
sErrorDescription = Err.Description

You can also record the form name from where the error is thrown.

I hope this helps
Chitra
 
:( I don't remember the name of the dll, because i downloaded it at my friend's house and forgot the name....

But i tried saw the references, and i have 2 questions : the items that are selected ar the items i need to run the program?

Do i have to install the dll files?

And how do you register the dll files?
 
>> the items that are selected are the items i need to run the program?

that's correct.

you only need to register activex dll files. but you will need the non-activex files in the same directory as the exe file or in a directory that's set up in the system path (the system folder should already be set up).

VB includes an installation program - see the package and deployment wizard - it will create a setup program that has all the files you need to install on your friend's machine.

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
Thank You !!!!!! ArtieChoke & chitras91 you both have been a BIG HELP


Thanx For Everything

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top