Ask a Question related to Dreamweaver AppDev, Design and Development.
-
Gale Coleman #1
Problems with descending dates
Hello all,
Using Ultradev 4, Access 2000 with Window 2000 pro, IIS 5
Here is my problem.
I have a page that lists a number of events by date in descending order.
All was fine until we hit the year 2005. The 2005 dates are not showing up
in order. They are coming at the very last of list. It is a huge problem
when you ask that only the first 4 records are shown. How do I make it so
the records that are dated 2005 are at the top? Code following.
thanks
Gale
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="../../Connections/connEvents.asp" -->
<title>Legal Services of ND Community Education Events</title>
<%
set rsRecentUpdates = Server.CreateObject("ADODB.Recordset")
rsRecentUpdates.ActiveConnection = MM_connEvents_STRING
rsRecentUpdates.Source = "SELECT * FROM eventsTable ORDER BY eventsDate
DESC"
rsRecentUpdates.CursorType = 0
rsRecentUpdates.CursorLocation = 2
rsRecentUpdates.LockType = 3
rsRecentUpdates.Open()
rsRecentUpdates_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = -1
Dim Repeat1__index
Repeat1__index = 0
rsRecentUpdates_numRows = rsRecentUpdates_numRows + Repeat1__numRows
%>
<link rel="stylesheet" href="../tree.css" type="text/css">
<script language="JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++)
x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length;
i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && document.getElementById) x=document.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
<body text="#000000" bgcolor="#FFFFFF" leftmargin="0" topmargin="0"
onLoad="MM_preloadImages('graphics/available_services_f2.jpg','graphics/publ
ications_button_admin_f2.jpg','../../administrative_office/graphics/apply_bu
tton_admin_r2_c1_f2.jpg','../graphics/available_services_f2.jpg','../../admi
nistrative_office/graphics/helpful_links_f2.jpg','../graphics/publications_b
utton_admin_f2.jpg','../graphics/outreach_schedule_f2.jpg','../graphics/sear
ch_website_f2.jpg','../graphics/self_help_f2.jpg','../../centralized_intake/
graphics/legal_services_brownbutton_f2.jpg','../../centralized_intake/graphi
cs/general_information_brownbutton_f2.jpg','../../administrative_office/grap
hics/current_events_button_r1_c2_f2.jpg')">
<table width="100%" border="0" cellpadding="1" bgcolor="#E1E1C4">
<tr>
<td bgcolor="E1E1C4" width="15%" align="left" valign="bottom"><a
href="add_event.asp" target="_parent">Add
Event</a><br>
<a href="/tree/events/archive_events.asp" target="_blank">Archived
Events</a><br>
</td>
<td width="85%" align="left" valign="middle" class="headings">
<table width="82%" border="0" cellpadding="1">
<tr>
<td class="heading" align="center" valign="top">Legal Services of
North
Dakota<br>
Community Education Events</td>
</tr>
</table>
</td>
</tr>
</table>
<table width="65%" border="0" cellpadding="0" align="center" height="32">
<tr align="center" valign="top">
<td width="13%" height="32" valign="bottom"><a
href="../../frames/how_to_apply_for_services.html"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('apply_button_admin_r2_c 1','','../../administrativ
e_office/graphics/apply_button_admin_r2_c1_f2.jpg',1);" target="_parent"src="../../administrative_office/graphics/apply_button_admin_r2_c1.jpg"><img name="apply_button_admin_r2_c1"
width="127" height="28" border="0"></a>
</td>
<td width="14%" height="32" valign="bottom"> <a
href="../../frames/available_services.html" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('available_services','', '../graphics/available_ser
vices_f2.jpg',1);" target="_parent" ><img name="available_services"
src="../graphics/available_services.jpg" width="127" height="29" border="0">
</a> </td>
<td width="14%" height="32" valign="bottom"><a
href="../../centralized_intake/pages/helpful_links.html"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('helpful_links','','../../administrative_office/gr
aphics/helpful_links_f2.jpg',1);" target="_parent" ><img
name="helpful_links"
src="../../administrative_office/graphics/helpful_links.jpg" width="127"
height="28" border="0"></a>
</td>
<td width="14%" height="32" valign="bottom"> <a href="../land_tree.asp"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('legal_services_brownbut ton','','../../centralized
_intake/graphics/legal_services_brownbutton_f2.jpg',1);" target="_parent"src="../../centralized_intake/graphics/legal_services_brownbutton.jpg"><img name="legal_services_brownbutton"
width="127" height="28" border="0"></a></td>
<td width="14%" height="32" valign="bottom"> <a
href="../general_information.asp" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('general_information_bro wnbutton','','../../centra
lized_intake/graphics/general_information_brownbutton_f2.jpg',1);"
target="_parent" ><img name="general_information_brownbutton"
src="../../centralized_intake/graphics/general_information_brownbutton.jpg"
width="158" height="28" border="0">
</a> </td>
</tr>
<tr align="center" valign="top">
<td width="13%" height="31" valign="bottom"> <a
href="../../brochures/publication_list.html"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('publications_button_adm in','','../graphics/public
ations_button_admin_f2.jpg',1);" target="_parent" ><img
name="publications_button_admin"
src="../graphics/publications_button_admin.jpg" width="127" height="28"
border="0">
</a> </td>
<td height="31" valign="bottom"> <a
href="../outreach_calendar/calendar/calendar.asp"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('outreach_schedule','',' ../graphics/outreach_sched
ule_f2.jpg',1);" target="_parent" ><img name="outreach_schedule"
src="../graphics/outreach_schedule.jpg" width="127" height="28" border="0">
</a> </td>
<td height="31" valign="bottom"> <a href="../../search.asp"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('search_website','','../graphics/search_website_f2
..jpg',1);" target="_blank" ><img name="search_website"
src="../graphics/search_website.jpg" width="127" height="29" border="0">
</a> </td>
<td width="14%" height="31" valign="bottom"> <a href="../self_help.html"
onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('self_help','','../graphics/self_help_f2.jpg',1);"
target="_parent" ><img name="self_help" src="../graphics/self_help.jpg"
width="127" height="28" border="0"></a></td>
<td width="14%" height="31" valign="bottom">
<table border="0" cellpadding="0" cellspacing="0" width="165">
<!-- fwtable fwsrc="current_events_button.png"
fwbase="current_events_button.jpg" fwstyle="Dreamweaver" fwdocid =
"1487905304" fwnested="0" -->
<tr>
<td><img src="../../administrative_office/graphics/spacer.gif"
width="6" height="1" border="0"></td>
<td><img src="../../administrative_office/graphics/spacer.gif"
width="156" height="1" border="0"></td>
<td><img src="../../administrative_office/graphics/spacer.gif"
width="3" height="1" border="0"></td>
<td><img src="../../administrative_office/graphics/spacer.gif"
width="1" height="1" border="0"></td>
</tr>
<tr>
<td><img name="current_events_button_r1_c1"
src="../../administrative_office/graphics/current_events_button_r1_c1.jpg"
width="6" height="28" border="0"></td>
<td><a href="events.asp" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('current_events_button_r 1_c2','','../../administra
tive_office/graphics/current_events_button_r1_c2_f2.jpg',1);"
target="_parent" ><img name="current_events_button_r1_c2"
src="../../administrative_office/graphics/current_events_button_r1_c2.jpg"
width="156" height="28" border="0"></a></td>
<td><img name="current_events_button_r1_c3"
src="../../administrative_office/graphics/current_events_button_r1_c3.jpg"
width="3" height="28" border="0"></td>
<td><img src="../../administrative_office/graphics/spacer.gif"
width="1" height="28" border="0"></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<table width="80%" border="0" cellpadding="1" align="center">
<%
While ((Repeat1__numRows <> 0) AND (NOT rsRecentUpdates.EOF))
%>
<tr>
<td
width="27%"><%=(rsRecentUpdates.Fields.Item("event sDate").Value)%></td>
<td><%=(rsRecentUpdates.Fields.Item("eventsName"). Value)%></td>
</tr>
<tr>
<td width="27%"> </td>
<td>
<p><%=(rsRecentUpdates.Fields.Item("eventDescripti on").Value)%></p>
<p> </p>
</td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsRecentUpdates.MoveNext()
Wend
%>
<%
rsRecentUpdates.Close()
%>
</table>
<p> </p>
Gale Coleman Guest
-
How to make an auotmatic descending list of numbers in atable?
I have a table with 4 columns and 80 rows. I'd like to add a 5th column, and put numbers 1, 2, 3, 4, 5 etc all the way down However, i'd like... -
Problems with Dates
I have a database with the following entry: Table Name: director_bs dir_date 11/12/2004 14/12/2004 29/12/2004 13/01/2005 15/01/2005 -
Ascending descending arrows without hyperlink
Hi Is there a neat way of adding arrow images to datagrid columns next to the column heading text but not part of the hyperlink? e.g. <a... -
Descending sort
Hi, I have a flat database file this way: A00469.PE1 SSGGH.PE1 HBG011318 1.26943 39 A00469.PE1 SGGH2.PE1 HBG011318... -
Ascending and Descending Sorting of Columns in an ASP.NET DataGrid...
I found some good information On "Ascending and Descending Sorting of Columns in an ASP.NET DataGrid..." at this site... -
Gale Coleman #2
Re: Problems with descending dates
I figured it out folks. I had the access database field marked for text
instead of for dates so it didn't know how to put them in order.
Gale Coleman Guest



Reply With Quote

