![]() |
|
|
+ Search |
![]()
|
Jun 12th, 2000 07:47
Jerry Yoakum,
The variables in your ASP are of type Variant, but in your dll you
specify a different type.
example (code with error)
------------------------------------------------------------------------
ASP Code:
dim pldm(15), i
for i = 1 to 15
pldm(i) = objPhePrice.PlateData(i)
%><br>pldm(<%=i%>) = <%=pldm(i)%><%
next
dll Code:
Public Function PlateData(iIndex As Integer) As Single
------------------------------------------------------------------------
The dll is expecting to receive an Integer but instead gets a Variant.
To beat this problem use a conversion function. More more information
on conversion functions goto the FAQTS: ASP Functions page
<http://www.faqts.com/knowledge-base/index.phtml/fid/409/lang/en>.
example (code without error)
------------------------------------------------------------------------
ASP Code:
dim pldm(15), i
for i = 1 to 15
pldm(i) = objPhePrice.PlateData(CInt(i))
%><br>pldm(<%=i%>) = <%=pldm(i)%><%
next
dll Code:
Public Function PlateData(iIndex As Integer) As Single
------------------------------------------------------------------------
© 1999-2004 Synop Pty Ltd