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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Type mismatch error that should be working

Status
Not open for further replies.

PoppapumpJ

Programmer
Dec 17, 2001
86
US
I have an include file with a function to build a string of all the error messages that occur. It takes 3 paramaters and builds the error message, then tacks it onto the end of any previous messages.

now, the problem is when I call this function it says 'Type mismatch error'.

Everything works fine on my development machine, but when I move it to the Production machine, it gives this error.

Any Ideas.

Thanks


Sub to build string
[tt]
sub BuildMessage(Source, Number, Description)

dim strMsgBuilder
if Source <> &quot;&quot; then strMsgBuilder = source & &quot; - &quot;

strMsgBuilder = strMsgBuilder & Number & &quot; - &quot; & description & &quot;<BR>&quot;

strMessage = strMsgBuilder
end sub
[/tt]

Call to sub
[tt]
BuildMessage &quot;GetResources&quot; , intret, objMachine.errMessage[/tt]
 
Is Number reserved??

try changing your variable name Number to vNumber
BDC.
 
No Luck,

I fact, I even took out all parms and it still does not work

'call to function
BuildMessage


'the function
sub BuildMessage()
strMessage = strMessage & &quot;test&quot;
end sub

It still says 'Type Mismatch'

I have tons of other function/sub calls, This is the only one causing the error.

thanks again
 
Try converting strMessage to a string before using it...

CStr(strMessage)
BDC.
 
Thanks for all your help.

Solution found.

Somewhere between checking source into sourcesafe and and getting latest version from SS, an out of date file got in there.

This prevented inc-Functions.asp from being included in the precessing of the page.

but I still wonder, If the function could not be found, why did it say &quot;type mismatch&quot; instead of function not found?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top