Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How do you determine the size of the dataset [the record count] delivered by a SqlDataSource?

Reply
Thread Tools

How do you determine the size of the dataset [the record count] delivered by a SqlDataSource?

 
 
Guest
Posts: n/a
 
      12-19-2005
Hello Everyone,

I am using VB and ASP.Net to build a web application with VS.2005.

I have a SqlDataSource defined and am using it to populate a table [Array].

Is there an easy way to determine the size of the dataset [the record count]
delivered by a SqlDataSource?

Any pointers would be greatly appreciated.

Bob
 
Reply With Quote
 
 
 
 
Showjumper
Guest
Posts: n/a
 
      12-19-2005
Have you tried the count function in sql
Example
SELECT COUNT(*) as "Number of employees"
FROM employees
WHERE salary > 25000;

<> wrote in message
news...
> Hello Everyone,
>
> I am using VB and ASP.Net to build a web application with VS.2005.
>
> I have a SqlDataSource defined and am using it to populate a table
> [Array].
>
> Is there an easy way to determine the size of the dataset [the record
> count]
> delivered by a SqlDataSource?
>
> Any pointers would be greatly appreciated.
>
> Bob



 
Reply With Quote
 
 
 
 
Daniel TIZON
Guest
Posts: n/a
 
      12-19-2005
You can subscribe to the folowing event, and read the AffectedRows property

Protected Sub SqlDataSource1_Selected(ByVal sender As Object, ByVal e As
System.Web.UI.WebControls.SqlDataSourceStatusEvent Args) Handles
SqlDataSource1.Selected
Label1.Text = String.Format("rows count: {0}", e.AffectedRows)
End Sub

--
Daniel TIZON
MCP - MCSD.NET - MCT

<> a écrit dans le message de news:
...
> Hello Everyone,
>
> I am using VB and ASP.Net to build a web application with VS.2005.
>
> I have a SqlDataSource defined and am using it to populate a table
> [Array].
>
> Is there an easy way to determine the size of the dataset [the record
> count]
> delivered by a SqlDataSource?
>
> Any pointers would be greatly appreciated.
>
> Bob



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can we determine stack size & Heap size at runtime ? sunny C Programming 5 08-17-2006 12:17 AM
You cannot add or change a record because a related record is required in table 'lok" André ASP .Net 0 06-25-2006 01:30 PM
You cannot add or change a record because a related record is required in table 'lok" André ASP .Net Web Controls 0 06-25-2006 01:30 PM
How do you measure the size of a page delivered to the browser (and the Viewstate) Joe Fallon ASP .Net 5 07-28-2005 02:04 AM
accessibility: possible to determine browser-chosen point size of a relative font-size? Timo Javascript 1 06-14-2004 02:36 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57