|
 |
asp_web_howto thread: a smiple if statement
Message #1 by "Lucas R. Haines" <LucasHaines@a...> on Thu, 7 Nov 2002 21:07:15
|
|
could some one please tell me what si wrong with this if statment.
<%IF (Request.QueryString("pcode")="1" and Request.QueryString("ID") =
RS.Fields("ID") ) THEN%>
<img src="/images/blackovalRC.gif" border="0">
<%END IF%>
i keep getting a type mismatch error thanks
Luke
Message #2 by kyle.b.willman@u... on Thu, 7 Nov 2002 15:03:37 -0600
|
|
What is the data type of the database field "ID"?
Kyle B. Willman
PricewaterhouseCoopers LLP
Office: xxx.xxx.xxxx
Cell: xxx.xxx.xxxx
"Lucas R. Haines" <LucasHaines@a...>
11/07/2002 03:07 PM
Please respond to "ASP Web HowTo"
To: "ASP Web HowTo" <asp_web_howto@p...>
cc:
Subject: [asp_web_howto] a smiple if statement
could some one please tell me what si wrong with this if statment.
<%IF (Request.QueryString("pcode")="1" and Request.QueryString("ID") =
RS.Fields("ID") ) THEN%>
<img src="/images/blackovalRC.gif" border="0">
<%END IF%>
i keep getting a type mismatch error thanks
Luke
_________________________________________________________________
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete the material
from any computer.
Message #3 by "Greg Partin" <GPartin@c...> on Thu, 07 Nov 2002 14:12:07 -0700
|
|
The value of RS.Fields("ID") is probably not what you think it is (maybe
NULL), or Request.Querystring("pcode") is not pass at all. Do a
response.write to find out what that values are and you will find your
error.
Greg
Greg Partin
Software Engineer
CompassLearning, Inc.
2400 N. Commerce Pkwy.
Suite #404
Weston, FL 33326
Message #4 by "Lucas Haines" <LucasHaines@a...> on Thu, 7 Nov 2002 13:12:54 -0800
|
|
Numeric
-----Original Message-----
From: kyle.b.willman@u...
[mailto:kyle.b.willman@u...]
Sent: Thursday, November 07, 2002 1:04 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: a smiple if statement
What is the data type of the database field "ID"?
Kyle B. Willman
PricewaterhouseCoopers LLP
Office: xxx.xxx.xxxx
Cell: xxx.xxx.xxxx
"Lucas R. Haines" <LucasHaines@a...>
11/07/2002 03:07 PM
Please respond to "ASP Web HowTo"
To: "ASP Web HowTo" <asp_web_howto@p...>
cc:
Subject: [asp_web_howto] a smiple if statement
could some one please tell me what si wrong with this if statment.
<%IF (Request.QueryString("pcode")="1" and Request.QueryString("ID")
RS.Fields("ID") ) THEN%>
<img src="/images/blackovalRC.gif" border="0">
<%END IF%>
i keep getting a type mismatch error thanks
Luke
_________________________________________________________________
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete the material
from any computer.
Message #5 by kyle.b.willman@u... on Thu, 7 Nov 2002 15:23:19 -0600
|
|
Try utilizing this:
Request.Querystring("ID") = CStr(RS.Fields("ID"))
This might work for you. I am assuming that the ID field cannot be null
due to DB restraints...
Kyle B. Willman
PricewaterhouseCoopers LLP
Office: xxx.xxx.xxxx
Cell: xxx.xxx.xxxx
"Lucas Haines" <LucasHaines@a...>
11/07/2002 03:12 PM
Please respond to "ASP Web HowTo"
To: "ASP Web HowTo" <asp_web_howto@p...>
cc:
Subject: [asp_web_howto] Re: a smiple if statement
Numeric
-----Original Message-----
From: kyle.b.willman@u...
[mailto:kyle.b.willman@u...]
Sent: Thursday, November 07, 2002 1:04 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: a smiple if statement
What is the data type of the database field "ID"?
Kyle B. Willman
PricewaterhouseCoopers LLP
Office: xxx.xxx.xxxx
Cell: xxx.xxx.xxxx
"Lucas R. Haines" <LucasHaines@a...>
11/07/2002 03:07 PM
Please respond to "ASP Web HowTo"
To: "ASP Web HowTo" <asp_web_howto@p...>
cc:
Subject: [asp_web_howto] a smiple if statement
could some one please tell me what si wrong with this if statment.
<%IF (Request.QueryString("pcode")="1" and Request.QueryString("ID")
RS.Fields("ID") ) THEN%>
<img src="/images/blackovalRC.gif" border="0">
<%END IF%>
i keep getting a type mismatch error thanks
Luke
_________________________________________________________________
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete the material
from any computer.
_________________________________________________________________
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete the material
from any computer.
Message #6 by "Lucas Haines" <LucasHaines@a...> on Thu, 7 Nov 2002 13:24:03 -0800
|
|
Gregg
I have tried that the values do exist and the pcode is passed to the page
any other suggestions?
thanks for you help
Luke
-----Original Message-----
From: Greg Partin [mailto:GPartin@c...]
Sent: Thursday, November 07, 2002 1:12 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: a smiple if statement
The value of RS.Fields("ID") is probably not what you think it is (maybe
NULL), or Request.Querystring("pcode") is not pass at all. Do a
response.write to find out what that values are and you will find your
error.
Greg
Greg Partin
Software Engineer
CompassLearning, Inc.
2400 N. Commerce Pkwy.
Suite #404
Weston, FL 33326
Message #7 by "Lucas Haines" <LucasHaines@a...> on Thu, 7 Nov 2002 13:39:48 -0800
|
|
Kyle
thanks for the suggestion it works great.
is it because the database was pulling a numeric value and the querystring
is a string?
Luke
-----Original Message-----
From: kyle.b.willman@u...
[mailto:kyle.b.willman@u...]
Sent: Thursday, November 07, 2002 1:23 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: a smiple if statement
Try utilizing this:
Request.Querystring("ID") = CStr(RS.Fields("ID"))
This might work for you. I am assuming that the ID field cannot be null
due to DB restraints...
Kyle B. Willman
PricewaterhouseCoopers LLP
Office: xxx.xxx.xxxx
Cell: xxx.xxx.xxxx
"Lucas Haines" <LucasHaines@a...>
11/07/2002 03:12 PM
Please respond to "ASP Web HowTo"
To: "ASP Web HowTo" <asp_web_howto@p...>
cc:
Subject: [asp_web_howto] Re: a smiple if statement
Numeric
-----Original Message-----
From: kyle.b.willman@u...
[mailto:kyle.b.willman@u...]
Sent: Thursday, November 07, 2002 1:04 PM
To: ASP Web HowTo
Subject: [asp_web_howto] Re: a smiple if statement
What is the data type of the database field "ID"?
Kyle B. Willman
PricewaterhouseCoopers LLP
Office: xxx.xxx.xxxx
Cell: xxx.xxx.xxxx
"Lucas R. Haines" <LucasHaines@a...>
11/07/2002 03:07 PM
Please respond to "ASP Web HowTo"
To: "ASP Web HowTo" <asp_web_howto@p...>
cc:
Subject: [asp_web_howto] a smiple if statement
could some one please tell me what si wrong with this if statment.
<%IF (Request.QueryString("pcode")="1" and Request.QueryString("ID")
RS.Fields("ID") ) THEN%>
<img src="/images/blackovalRC.gif" border="0">
<%END IF%>
i keep getting a type mismatch error thanks
Luke
_________________________________________________________________
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete the material
from any computer.
_________________________________________________________________
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete the material
from any computer.
|
|
 |