N
Neo Chou
Greetings!
I have a question about constant.
I have a page like:
----------------------------------------------------------------------
<%
Const adInteger = 3 'copied from adovbs.inc
Const ucApple = 0 'user defined constant
Const ucOrange = 1 'user defined constant
%>
<%
Dim Return_Value
' execute a stored procedure and get the return value
' the return value can only be either 0 or 1
%>
<table>
<tr><td>
<%
If Return_Value = ucApple Then
Response.Write "Apple"
ElseIf Return_Value = ucOrange Then
Response.Write "Orange"
Else
Response.Write "Nothing"
End If
%>
</td></tr>
</table>
-----------------------------------------------------------------------
It prints "Nothing" all the time no matter the stored procedure returns 0 or
1. If I replace "ucApple" with 0 and "ucOrange" with 1, the output is
correct. I believe the user defined constants are lost. But I can use
"adInteger" when I call the stored procedure to create parameters. Why? Am
I doing wrong?
Thanks in advance.
Neo
I have a question about constant.
I have a page like:
----------------------------------------------------------------------
<%
Const adInteger = 3 'copied from adovbs.inc
Const ucApple = 0 'user defined constant
Const ucOrange = 1 'user defined constant
%>
<%
Dim Return_Value
' execute a stored procedure and get the return value
' the return value can only be either 0 or 1
%>
<table>
<tr><td>
<%
If Return_Value = ucApple Then
Response.Write "Apple"
ElseIf Return_Value = ucOrange Then
Response.Write "Orange"
Else
Response.Write "Nothing"
End If
%>
</td></tr>
</table>
-----------------------------------------------------------------------
It prints "Nothing" all the time no matter the stored procedure returns 0 or
1. If I replace "ucApple" with 0 and "ucOrange" with 1, the output is
correct. I believe the user defined constants are lost. But I can use
"adInteger" when I call the stored procedure to create parameters. Why? Am
I doing wrong?
Thanks in advance.
Neo