Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Code Support: ASP (Non-Forum Related)
 Please check this ORDER BY code for me
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

chinh10
Junior Member

125 Posts

Posted - 28 June 2001 :  20:41:10  Show Profile
Database name: timecard01
Table name: timecard
Column name: dept
Field name: dept
Recordset = Recordset1


<%
dept_flag = Request.Querystring ("dept_flag")
if (dept_flag = true) Then
SQLstr = "SELECT * FROM timecard ORDER BY dept ASC"
else
SQLstr = "SELECT * FROM timecard"
end if
%>
<a href="TimeCard_HR_period.asp?dept_flag=true">Dept</a>

Don't know what Im doing wrong but when I click on the link, it just flash but not show the of the dept by order ????

Please help
Thanks in advance


Deleted
deleted

4116 Posts

Posted - 28 June 2001 :  22:00:47  Show Profile
As far as I know, you can only pass string values through querystring. If you check the existance of the flag use this (filename.asp?dept_flag=true):


...
if (dept_flag = "true") Then
...


In your case, it never executes the THEN part.


Think Pink
Go to Top of Page

cevans
Junior Member

Canada
101 Posts

Posted - 29 June 2001 :  09:11:07  Show Profile  Send cevans an ICQ Message
You could also convert to boolean, like this:

...
If CBool(dept_flag) Then
...

or

dept_flag = CBool(Request.Querystring ("dept_flag"))
If dept_flag Then
...



Clark
Go to Top of Page

chinh10
Junior Member

125 Posts

Posted - 29 June 2001 :  12:57:04  Show Profile
I did changed, but it still the same.
I will try another way to hand code it
Thank you very much for your help

<%
dept_flag = CBool(Request.Querystring ("dept_flag"))If dept_flag Then
SQLstr = "SELECT * FROM timecard ORDER BY dept ASC"
else
SQLstr = "SELECT * FROM timecard"
end if
%>
<a href="TimeCard_HR_period.asp?dept_flag=true">Dept</a>

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 2.01 seconds. Powered By: Snitz Forums 2000 Version 3.4.07