Results 1 to 7 of 7

Thread: Runtime Error '13' Type mismatch in exec

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Jun 2000
    Posts
    80

    Unhappy

    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

  2. #2
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Boulder, Colorado, USA
    Posts
    325
    Be sure you have
    Code:
     Option Explicit
    in all of your Modules and Forms. At compile time it will hopefully trap your problem.

    Hope this helps.
    -Shickadance

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Jun 2000
    Posts
    80
    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

  4. #4
    PowerPoster Chris's Avatar
    Join Date
    Jan 1999
    Location
    K-PAX
    Posts
    3,238

    Smile

    Hi JackV
    Be sure you didn't put any On Error Resume Next statement inside your code, If yes, just change it to others like On Error Goto ABC_Err and try to trap the error location. Instead of guessing here & there.


  5. #5
    Frenzied Member Mark Sreeves's Avatar
    Join Date
    Nov 1999
    Location
    UK
    Posts
    1,845
    Is the type mismatch occuring when emailing by any chance?



    Mark
    -------------------

  6. #6
    Guest
    Is the "Break On All Errors" turned on ?
    Probably that might help you get to the code giving the error.

  7. #7

    Thread Starter
    Lively Member
    Join Date
    Jun 2000
    Posts
    80

    Smile

    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
  •  



Click Here to Expand Forum to Full Width