|
-
Jun 1st, 2000, 04:13 AM
#1
Thread Starter
Lively Member
Hi there I just wrote a small data access application that reads from a SQL 7 database, writes the result to a text file, and then using a 3rd party email component, emails the text file to another address.
The problem is that when I install the executable on the machine that it is supposed to run on, I get a runtime error '13', Type mismatch. I get this error after the program runs. The program works, just this message box pops up, at the end.
What's also weird, this doesn't happen on my development machine, only the other one. The host machine has the VB runtime libraries installed as well as the dll's that belong to the 3rd party email component.
My app uses ADO 2.1, which the host machine didn't have the dll for, thus I copied it into the c:\Program Files\Common Files\System\Ado folder. Unfortunately that didn't work. So I recompiled the app using ADO 2.0 which the host machine did have the dll file for. Alas that didn't work either.
The host machine runs NT4 w/ service pack 5. The development machine runs Win 2K Pro. Any help would be greatly appreciated as this app will run as a SQL 7 job and will be part of a larger solution. Thanks in advance.
Regards,
Jack Vinitsky
-
Jun 1st, 2000, 04:41 AM
#2
Hyperactive Member
Be sure you have in all of your Modules and Forms. At compile time it will hopefully trap your problem.
Hope this helps.
-
Jun 1st, 2000, 05:00 AM
#3
Thread Starter
Lively Member
Nope, Option Expicit is there. I have no problems running the executable or compiling it on the development machine. All the trouble happens on the host.
-Jack Vinitsky
-
Jun 1st, 2000, 08:38 AM
#4
-
Jun 1st, 2000, 03:21 PM
#5
Frenzied Member
Is the type mismatch occuring when emailing by any chance?
-
Jun 1st, 2000, 08:36 PM
#6
Is the "Break On All Errors" turned on ?
Probably that might help you get to the code giving the error.
-
Jun 1st, 2000, 08:45 PM
#7
Thread Starter
Lively Member
Hi all, thanks for all your help.
My program is divided into 4 function calls. I put message boxes after each function call and found out that the last function, which updated a log file using File System Objects wasn't running.
It turned out that the scrrun.dll (Micosoft Scripting Runtime) on the host machine wasn't functioning. So I copied it from the development machine onto the host machine. Though my boss wasn't too happy with me changing dll's on one of his servers, everything seems to work now.
After I found which function was causing the problem, I numbered each line and then used a litte known function call "erl" in an error handler which then told me what line the error was occuring. Here is the message box command I used after numbering each line:
ErrTrap:
msgbox err & " " & error & " in function xyz in/after _ line: " & erl
Hope this helps others.
--Jack Vinitsky
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
|