NEWBIE: Recordcount of SqlDataSource

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top