0
asp.net Problem with repeat region

/t5/dreamweaver-discussions/asp-net-problem-with-repeat-region/td-p/749841
Apr 20, 2006
Apr 20, 2006
Copy link to clipboard
Copied
I have a page with a repeat region that's supposed to show
the guestbook entries from a d-base. I have the dataset set up to
sort in descending order based on the date but it's not sorting for
some reason. Below is the code. The date field is set up as a
date/time field in the Access D-base. Any idea why it's not
sorting?
TOPICS
Server side applications
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more
LEGEND
,
/t5/dreamweaver-discussions/asp-net-problem-with-repeat-region/m-p/749842#M153016
Apr 20, 2006
Apr 20, 2006
Copy link to clipboard
Copied
I am not sure if it is what is causing the problem but the
word DATE is one
that should not be used when naming database fields as it is reserved in
SQL.
--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver
Valleybiz Internet Design
www.valleybiz.net
"schristy" <webforumsuser@macromedia.com> wrote in message
news:e282g9$4o5$1@forums.macromedia.com...
>I have a page with a repeat region that's supposed to show the guestbook
> entries from a d-base. I have the dataset set up to sort in descending
> order
> based on the date but it's not sorting for some reason. Below is the
> code.
> The date field is set up as a date/time field in the Access D-base. Any
> idea
> why it's not sorting?
>
>
> <%@ Page Language="VB" ContentType="text/html"
> ResponseEncoding="iso-8859-1" %>
> <%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls"
> Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,cultu
> re=neutral" %>
> <MM
ataSet
> id="guestbookdataset"
> runat="Server"
> IsStoredProcedure="false"
> ConnectionString='<%#
> System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_gue
> stbook") %>'
> DatabaseType='<%#
> System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETY
> PE_guestbook") %>'
> CommandText='<%# "SELECT * FROM guestbook ORDER BY ""DATE"" DESC" %>'
> Debug="true"
> ></MM
ataSet>
> <MM
ageBind runat="server" PostBackBind="true" />
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> " http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <title>Mr C's Guestbook</title>
> </head>
> <body>
> <p align="center"><strong><font size="5" face="Verdana, Arial, Helvetica,
> sans-serif">Mr. C's Guestbook</font></strong></p>
> <table width="740" border="1" cellspacing="2" cellpadding="1">
> <ASP:Repeater runat="server" DataSource='<%#
> guestbookdataset.DefaultView
> %>'>
> <ItemTemplate>
> <tr>
> <td width="245" valign="top"><p><font size="2" face="Verdana,
> Arial,
> Helvetica, sans-serif"><strong>Name:</strong> <%#
> guestbookdataset.FieldValue("NAME", Container) %></font></p>
> <p><font
> size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Date
> Posted:</strong> <%# guestbookdataset.FieldValue("DATE", Container)
> %></font></p></td>
> <td width="479" valign="top"><font size="2" face="Verdana, Arial,
> Helvetica, sans-serif"><%# guestbookdataset.FieldValue("MESSAGE",
> Container)
> %></font></td>
> </tr>
> <tr bgcolor="#CCCCCC">
> <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica,
> sans-serif"> </font></td>
> </tr>
> </ItemTemplate>
> </ASP:Repeater>
> </table>
> <p> </p>
> </body>
> </html>
>
that should not be used when naming database fields as it is reserved in
SQL.
--
Paul Whitham
Certified Dreamweaver MX2004 Professional
Adobe Community Expert - Dreamweaver
Valleybiz Internet Design
www.valleybiz.net
"schristy" <webforumsuser@macromedia.com> wrote in message
news:e282g9$4o5$1@forums.macromedia.com...
>I have a page with a repeat region that's supposed to show the guestbook
> entries from a d-base. I have the dataset set up to sort in descending
> order
> based on the date but it's not sorting for some reason. Below is the
> code.
> The date field is set up as a date/time field in the Access D-base. Any
> idea
> why it's not sorting?
>
>
> <%@ Page Language="VB" ContentType="text/html"
> ResponseEncoding="iso-8859-1" %>
> <%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls"
> Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,cultu
> re=neutral" %>
> <MM

> id="guestbookdataset"
> runat="Server"
> IsStoredProcedure="false"
> ConnectionString='<%#
> System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_gue
> stbook") %>'
> DatabaseType='<%#
> System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETY
> PE_guestbook") %>'
> CommandText='<%# "SELECT * FROM guestbook ORDER BY ""DATE"" DESC" %>'
> Debug="true"
> ></MM

> <MM

> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
> " http://www.w3.org/TR/html4/loose.dtd">
> <html>
> <head>
> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
> <title>Mr C's Guestbook</title>
> </head>
> <body>
> <p align="center"><strong><font size="5" face="Verdana, Arial, Helvetica,
> sans-serif">Mr. C's Guestbook</font></strong></p>
> <table width="740" border="1" cellspacing="2" cellpadding="1">
> <ASP:Repeater runat="server" DataSource='<%#
> guestbookdataset.DefaultView
> %>'>
> <ItemTemplate>
> <tr>
> <td width="245" valign="top"><p><font size="2" face="Verdana,
> Arial,
> Helvetica, sans-serif"><strong>Name:</strong> <%#
> guestbookdataset.FieldValue("NAME", Container) %></font></p>
> <p><font
> size="2" face="Verdana, Arial, Helvetica, sans-serif"><strong>Date
> Posted:</strong> <%# guestbookdataset.FieldValue("DATE", Container)
> %></font></p></td>
> <td width="479" valign="top"><font size="2" face="Verdana, Arial,
> Helvetica, sans-serif"><%# guestbookdataset.FieldValue("MESSAGE",
> Container)
> %></font></td>
> </tr>
> <tr bgcolor="#CCCCCC">
> <td colspan="2"><font size="2" face="Verdana, Arial, Helvetica,
> sans-serif"> </font></td>
> </tr>
> </ItemTemplate>
> </ASP:Repeater>
> </table>
> <p> </p>
> </body>
> </html>
>
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

Guest
AUTHOR
/t5/dreamweaver-discussions/asp-net-problem-with-repeat-region/m-p/749843#M153017
Apr 20, 2006
Apr 20, 2006
Copy link to clipboard
Copied
Aaaaah. I never thought of that. I guess I should have
checked my SQL list of reserved words. Thanks for the help.
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting.
Learn more

