"Runtime Error 13 Data Type mismatch"

"Runtime Error 13 Data Type mismatch"

Post by John Smit » Wed, 22 May 2002 05:33:23



I get this error from time to time when running my compiled VB app and my
app crashes.  I'm using VB 6.0,  SQLServr 2000,  MDAC 2.5 and who knows what
else.  I have error handlers in all my modules but this doesn't seem to be
trapped.  I use mainly stored procedures and I suspect it might have
something to do with errors generated by SQL that aren't handled by VB.  Can
anyone give me any advice here.  Upgrade to MDAC 2.6 or 2.7?

Thanks,
Tom H

 
 
 

"Runtime Error 13 Data Type mismatch"

Post by Gary » Wed, 22 May 2002 06:10:23


I'm guessing that even though you think you have error handlers in all your
modules, you're missing one in at least the spot that this error occurs.

Can you reproduce this error consistently?

Are you saying that performing the same steps in the Development
Environment, you cannot reproduce this error?

The error means that the variable or property that you are trying to put
some data in doesn't not accept the datatype of the value you are trying to
put into it.  Most of my errors of this type surround date/time datatypes
but maybe you just declared one incorrectly.  I would suggest going through
your application again to make sure you have error handlers everywhere, and
when you find the spots that don't have it, putting one in will help you
narrow down where that error is occuring so you can scrutenize your
datatypes that are used in that section.

Gary


> I get this error from time to time when running my compiled VB app and my
> app crashes.  I'm using VB 6.0,  SQLServr 2000,  MDAC 2.5 and who knows
what
> else.  I have error handlers in all my modules but this doesn't seem to be
> trapped.  I use mainly stored procedures and I suspect it might have
> something to do with errors generated by SQL that aren't handled by VB.
Can
> anyone give me any advice here.  Upgrade to MDAC 2.6 or 2.7?

> Thanks,
> Tom H



 
 
 

"Runtime Error 13 Data Type mismatch"

Post by John Smit » Wed, 22 May 2002 06:26:15


Hey Gary,

Quote:> I'm guessing that even though you think you have error handlers in all
your
> modules, you're missing one in at least the spot that this error occurs.

Possible

Quote:> Can you reproduce this error consistently?

No.

Quote:> Are you saying that performing the same steps in the Development
> Environment, you cannot reproduce this error?

It would be easy to debug if this were true.

Thanks for the advice Gary
Tom H



> > I get this error from time to time when running my compiled VB app and
my
> > app crashes.  I'm using VB 6.0,  SQLServr 2000,  MDAC 2.5 and who knows
> what
> > else.  I have error handlers in all my modules but this doesn't seem to
be
> > trapped.  I use mainly stored procedures and I suspect it might have
> > something to do with errors generated by SQL that aren't handled by VB.
> Can
> > anyone give me any advice here.  Upgrade to MDAC 2.6 or 2.7?

> > Thanks,
> > Tom H


 
 
 

"Runtime Error 13 Data Type mismatch"

Post by Val Mazu » Wed, 22 May 2002 11:19:46


Hi,

I think it could be because your error handler part is not working properly.
I mean not designed properly. If it can trap error once and cannot another
error later on, then it looks like you reset (disable) error handling after
trapping first error. In that case you need to find particular situation
when it happens and debug application

--
Val Mazur
Microsoft MVP


> I get this error from time to time when running my compiled VB app and my
> app crashes.  I'm using VB 6.0,  SQLServr 2000,  MDAC 2.5 and who knows
what
> else.  I have error handlers in all my modules but this doesn't seem to be
> trapped.  I use mainly stored procedures and I suspect it might have
> something to do with errors generated by SQL that aren't handled by VB.
Can
> anyone give me any advice here.  Upgrade to MDAC 2.6 or 2.7?

> Thanks,
> Tom H