M
Michael Bosco
Hi. I am fairly new to ASP. I have to build a website in ASP 3 that
interfaces with VB 6 dll's. I've noticed some strange behavior, so I
devised the following tests. Here's my test VB 6 function...
Public Function ReturnGivenBool(blnReturn As Boolean) As Boolean
ReturnGivenBool = blnReturn
End Function
All it does is return the boolean value it receives.
The following call works, it returns True (I'm logging all this stuff
in the event viewer)...
blnIn = true
objTest.ReturnGivenBool (blnIn)
Problem #1
However if I want to print the return to the webpage...
<% blnIn = true %>
<%= objTest.ReturnGivenBool (blnIn) %>
I get the ASP error: "Type mismatch: objTest.ReturnGivenBool". Why
would it work in one instance but not the other?
While trying to get around this problem, I discovered...
objTest.ReturnGivenBool (blnIn) (variable input param, do not save
return value) works...
blnReturnCode = objTest.ReturnGivenBool (true) (hardcode input param,
save return value) also works, but combining them...
blnReturnCode = objTest.ReturnGivenBool(blnIn) (variable input param
and save return value) gives me the same type mismatch error I got
above.
Does this make sense to anyone?? Any help would be greatly
appreciated.
Thanks.
interfaces with VB 6 dll's. I've noticed some strange behavior, so I
devised the following tests. Here's my test VB 6 function...
Public Function ReturnGivenBool(blnReturn As Boolean) As Boolean
ReturnGivenBool = blnReturn
End Function
All it does is return the boolean value it receives.
The following call works, it returns True (I'm logging all this stuff
in the event viewer)...
blnIn = true
objTest.ReturnGivenBool (blnIn)
Problem #1
However if I want to print the return to the webpage...
<% blnIn = true %>
<%= objTest.ReturnGivenBool (blnIn) %>
I get the ASP error: "Type mismatch: objTest.ReturnGivenBool". Why
would it work in one instance but not the other?
While trying to get around this problem, I discovered...
objTest.ReturnGivenBool (blnIn) (variable input param, do not save
return value) works...
blnReturnCode = objTest.ReturnGivenBool (true) (hardcode input param,
save return value) also works, but combining them...
blnReturnCode = objTest.ReturnGivenBool(blnIn) (variable input param
and save return value) gives me the same type mismatch error I got
above.
Does this make sense to anyone?? Any help would be greatly
appreciated.
Thanks.