Tom, never mind about the email. I did try to create a class for it. It was easy, I can add to it as needed, and I decided I like classes!
So now I'm working on adding a DAL. I'm probably starting with the wrong page! This page uses a repeater to display the names of everyone who joined or whose ad has been updated within the past 60 days. The SqlDataSource is:
<
asp:SqlDataSource ID="SqlDataSource1" runat="server" SelectCommand="select [First Name], [Last Name], [City], [State], [ReNewAd], [Male or Female], [File2], [NewAd] from [prisonmembers] Where ([NewAd] IS NOT NULL) and (DateDiff(dd, NewAd, getdate()) <= 60) order by [NewAd] Desc" ConnectionString="<%$ ConnectionStrings:wapApp %>" ></asp:SqlDataSource>
This page is currently working, yet when creating thre DAL, the select string isn't being accepted. I changed it to
"SELECT [ReNewAd], [Male or Female], [File2], [PHOTO], [First Name], [Last Name], [City], [State], [NewAd] FROM PrisonMembers Where ('NewAd' IS NOT NULL AND (DateDiff(dd, [NewAd], @Today') <= 60)) order by [NewAd] Desc"
But it really doesn't like the <= signs. Can I use the DateDiff function in the select string? How?
Diane