D
Daan
Hi!
I have this SqlSataSource (aspx 2.0):
<asp:SqlDataSource ID="ArtiestenSource" Runat="server"
SelectCommand="SELECT lower(artiest) AS artiest, COUNT(DISTINCT album) AS
albums, COUNT(artiest) AS tracks, SUM(seconden) AS seconden,
CONVERT(varchar, DATEADD(second, SUM(seconden), ''), 108) AS Duur FROM
dbo.muziek GROUP BY artiest"
ConnectionString="Server=DESERVER;User
ID=sa;Password=wachtwoord;Database=Muziek;Persist Security Info=True"
ProviderName="System.Data.SqlClient">
</asp:SqlDataSource>
Maybe someone knows how to retrieve the number of rows of this datasource?
(ArtiestenSource.RecordCount doesn't work. )
Also: I would display this number of rows like this:
<% response.write(ArtiestenSource.RecordCount) %>
But I don't doubt there is a typical dot net 2.0 way of displaying this
result. (So, something else then <% response.write() %>.
If I am right about that, does someone know what right way is?
Thanks!
Daan
I have this SqlSataSource (aspx 2.0):
<asp:SqlDataSource ID="ArtiestenSource" Runat="server"
SelectCommand="SELECT lower(artiest) AS artiest, COUNT(DISTINCT album) AS
albums, COUNT(artiest) AS tracks, SUM(seconden) AS seconden,
CONVERT(varchar, DATEADD(second, SUM(seconden), ''), 108) AS Duur FROM
dbo.muziek GROUP BY artiest"
ConnectionString="Server=DESERVER;User
ID=sa;Password=wachtwoord;Database=Muziek;Persist Security Info=True"
ProviderName="System.Data.SqlClient">
</asp:SqlDataSource>
Maybe someone knows how to retrieve the number of rows of this datasource?
(ArtiestenSource.RecordCount doesn't work. )
Also: I would display this number of rows like this:
<% response.write(ArtiestenSource.RecordCount) %>
But I don't doubt there is a typical dot net 2.0 way of displaying this
result. (So, something else then <% response.write() %>.
If I am right about that, does someone know what right way is?
Thanks!
Daan