|
-
Feb 10th, 2006, 05:50 AM
#1
Thread Starter
Hyperactive Member
Problem On Different PC
Hello,
I have created a very simple VB application (if you can really call it that ), which simply takes a copy of a database and copies it to a specific location at a time I specify on the form.
It works absolutely fine here when I create it, and I simply save it as an EXE to run on my home PC.
When I try to run it at home however, I get a message saying something along the lines of : System Error &H80070583 (-2147023485) Class does not exist
That said, if I open VB6 up at home, and run it from there, it seems to work fine.
Can you please tell me how I can get round this ?
Thanks.
J.
-
Feb 10th, 2006, 05:55 AM
#2
Addicted Member
Re: Problem On Different PC
Are you distributing only the EXE?
Which line is giving this error?
-
Feb 10th, 2006, 06:03 AM
#3
Thread Starter
Hyperactive Member
Re: Problem On Different PC
I can't find out which line is giving me the error as the program works in the debug version (i.e. In VB itself)
The message comes up as soon as I click onto the EXE.
-
Feb 10th, 2006, 06:08 AM
#4
Addicted Member
Re: Problem On Different PC
OK, are you just creating the EXE and copying on the other PC?
Plus have you added reference to any files in your VB project?
-
Feb 10th, 2006, 06:11 AM
#5
Re: Problem On Different PC
Yes i think you are just creating an exe and distributing it.
This will not work since VB requires a runtime file to be installed on the host machine. Try using the Package and Deployment wizard which should be in your VS folder. This will include all nessercery run times.
Pino
-
Feb 10th, 2006, 06:11 AM
#6
Thread Starter
Hyperactive Member
Re: Problem On Different PC
Thanks for your very quick response.
Yes I am just creating the EXE (I'll be honest, I know no other way to do it)
There are no references apart from the standard ones (VB for applications, VB runtime, VB objects and procedures etc)
-
Feb 10th, 2006, 06:14 AM
#7
Re: Problem On Different PC
Use the package and deployment wizard is the easiest to use, and will get the job done. Should be included with your VB install.
Its under Microsoft Visual Basic 6.0 Tools > P&D wizard
also more installers
http://www.vbforums.com/showthread.php?t=315829
Pino
-
Feb 10th, 2006, 06:19 AM
#8
Re: Problem On Different PC
Download MZTools.
Using it add line numbers to your code.
Then in the beginning of every sub add,
Just before all End Sub add,
VB Code:
Exit Sub
TrapErr:
MsgBox Err.Description & vbCrLf & _
"in Form1.Command1_Click " & _
"at line " & Erl, vbCritical Or vbOKOnly, "ERROR !"
Your code should look like this,
VB Code:
Private Sub Command1_Click()
On Error GoTo TrapErr
Dim strPath As String
10 strPath = "C:\WINXP\System32"
20 Text1.Text = Left(strPath, 3) 'Gets drive
30 Text2.Text = Right(strPath, Len(strPath) - 3)
Exit Sub
TrapErr:
MsgBox Err.Description & vbCrLf & _
"in Form1.Command1_Click " & _
"at line " & Erl, vbCritical Or vbOKOnly, "ERROR !"
End Sub
Change Form1.Command1_Click with your ComponentName.ProcedureName if you like.
Run compiled exe. When the error occours, a messagebox will be displayed with the line number. See that line in your code.
I have seen thin problem before. But I don't remember how I solved it.
Last edited by iPrank; Feb 10th, 2006 at 06:22 AM.
-
Feb 10th, 2006, 06:21 AM
#9
Addicted Member
Re: Problem On Different PC
And dont forget to add error handing to your project. 
At least you will know the module name and the procedure which is causing this error.
You can have line numbers added to your source code, so you can get the exact line which is causing such problems.
See this:
http://www.aivosto.com/vbtips/errorhandling.html
There must be some free, demo addins and are very helpful
-
Feb 10th, 2006, 06:22 AM
#10
Addicted Member
Re: Problem On Different PC
The problem is something related to Windows XP is all that i remember
-
Feb 10th, 2006, 06:23 AM
#11
Re: Problem On Different PC
iPrank, isnt the reason he will be getting the error because he hasnt created a install package?
-
Feb 10th, 2006, 06:26 AM
#12
Thread Starter
Hyperactive Member
Re: Problem On Different PC
Thank you all very much - I'll check it out when I get home tonight.
Cheers.
J.
-
Feb 10th, 2006, 06:29 AM
#13
Re: Problem On Different PC
 Originally Posted by Pino
iPrank, isnt the reason he will be getting the error because he hasnt created a install package?
 Originally Posted by Jonny1409
It works absolutely fine here when I create it, and I simply save it as an EXE to run on my home PC.
When I try to run it at home however, I get a message saying something along the lines of : System Error &H80070583 (-2147023485) Class does not exist
That said, if I open VB6 up at home, and run it from there, it seems to work fine.
I guess both here and his home has VB6 installed. And he is not using any extra dependencies.
So I guess it is not installer problem.
I have faced this problem in my development pc.
-
Feb 10th, 2006, 06:31 AM
#14
Re: Problem On Different PC
Just a minute,
Jonny1409, did you recompiled your app at home and tested again ?
It may be a service pack issue.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|