Forums

ASP

This topic is locked

Dont know how to Describe this

Posted 05 Apr 2002 05:57:07
1
has voted
05 Apr 2002 05:57:07 Bubba Joe posted:
Ok, I am trying to build a Page with a listing of Dynamic tables. by using the <font color=red>&lt;"%if Request.QueryString = "whatever" Then%"&gt;</font id=red> statements, and the tables are working fine. but what is not working is that, I am also trying to filter the record set with URL paramiters. If I run a test for the RS in UltraDev I get the wanted results. But when I run the page on the server it doesn't work. I have put a show if recordset is not empty statement to get the table to show. but I will not have any text on the page. In the RecordSet I have this exactly in the filter section.

Product_Types = URL parameter Product_types.

What am I doing wrong! This is in simple view should I be using Advanced? or is it something easier? I am about to pull my hair out, Please Help!

Replies

Replied 05 Apr 2002 07:16:52
05 Apr 2002 07:16:52 Hank Tan-Tenn replied:
Have you tried different values for that querystring on the real server? It could be that the recordset IS empty if the value is not in the database, so you see nothing.

But other things are possible. It's difficult to say more without the code.
Replied 09 Apr 2002 03:17:46
09 Apr 2002 03:17:46 Bubba Joe replied:
Well I have looked and there is data on the server adn tried it and I still get the same results. Any suggestions

Replied 09 Apr 2002 05:42:14
09 Apr 2002 05:42:14 Bubba Joe replied:
OK I thought I would show you what I am talking about.
OK here is the record set:
<img src="users.htcomp.net/lastingimages/helpimages/recordset.gif" border=0>

Here is the test:
<img src="users.htcomp.net/lastingimages/helpimages/test.gif" border=0>

Here is the result:
<img src="users.htcomp.net/lastingimages/helpimages/result.gif" border=0>

Here is what it shows in the browser:
<img src="users.htcomp.net/lastingimages/helpimages/badresult.gif" border=0>

I hope this helps May be you are seeing something that I am not.

Replied 09 Apr 2002 06:05:15
09 Apr 2002 06:05:15 Hank Tan-Tenn replied:
Hi,

Shouldn't the URL be

<pre id=code><font face=courier size=2 id=code>Products.asp?Product_Type=OEM</font id=code></pre id=code>

?

Replied 09 Apr 2002 15:47:46
09 Apr 2002 15:47:46 Bubba Joe replied:
I tried that But I will try that again. I tried some other stuff that I read a 4guysfromrolla but it didn't help.

Still scratching my head.

Replied 09 Apr 2002 20:48:22
09 Apr 2002 20:48:22 Hank Tan-Tenn replied:
I think you should consider posting the code (or a version of it with whatever sensitive data relabeled), particularly the section designed to show the "Change Intro/Change Product Listing" table, i.e. the recordset. Especially if you've introduced additional code other than inserting RS fields from the UD panel.

Just my 0.02 USD <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>.

Edited by - akc on 09 Apr 2002 20:49:44
Replied 09 Apr 2002 23:46:15
09 Apr 2002 23:46:15 Bubba Joe replied:
OK I will do that as soon as I get off of work.

thank you

Edited by - Bubbajoe on 09 Apr 2002 23:46:51
Replied 10 Apr 2002 07:17:14
10 Apr 2002 07:17:14 Bubba Joe replied:
OK Big Break through,
OK I found out why the product field was not coming up it is be cause of the IF Then statement So who would I write this?
I originaly had
&lt;"%if Request.QueryString = "whatever" Then%"&gt;
So what would I need to put here instead? I have tried
If Request.Product = "whatever" Then
but it didn't workAny suggestions here from the ASP Gods?

Replied 10 Apr 2002 09:16:04
10 Apr 2002 09:16:04 Viktor Farcic replied:
Syntax is wrong. It's something like: &lt;"% If Request.QueryString("NameOfString" = "Whatever" Then %"&gt;

<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>
OK Big Break through,
OK I found out why the product field was not coming up it is be cause of the IF Then statement So who would I write this?
I originaly had
&lt;"%if Request.QueryString = "whatever" Then%"&gt;
So what would I need to put here instead? I have tried
If Request.Product = "whatever" Then
but it didn't workAny suggestions here from the ASP Gods?


<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Viktor Farcic

TalkZone Manager
Replied 10 Apr 2002 09:57:22
10 Apr 2002 09:57:22 Hank Tan-Tenn replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>So what would I need to put here instead?
<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Well, it depends on what you intend to do with the If-Then statement -- not clear to me (not being a god<img src=../images/dmxzone/forum/icon_smile_evil.gif border=0 align=middle>, ASP or not).

Original:
&lt;"%if Request.QueryString = "whatever" Then%"&gt;

Revised:
&lt;%If Request.Querystring("Product_Type" = "OEM" Then %&gt;
<font color=red>Some HTML code to do something, like show a table</font id=red>
&lt;%End If%&gt;

The above is just an example; it may NOT be in fact what you're trying to do. The point is the same, though: the If-Then statement above will show the code in red only if the querystring (e.g. ?Product_Type=OEM) has "OEM".

For other variations, consult any VBScript reference. I recommend DevGuru.com.

Edited by - akc on 10 Apr 2002 09:59:46
Replied 11 Apr 2002 01:35:06
11 Apr 2002 01:35:06 Bubba Joe replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>

Well, it depends on what you intend to do with the If-Then statement -- not clear to me (not being a god}<img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle>, ASP or not).

<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>

Thank you Thank you Thank you!
and Yes you are a GOD!

Reply to this topic