getting the number of rows...

how can you get the number of rows in query resault with out filling dataset and checking the "count"?
0
yanivhanya
8/3/2004 8:26:44 PM
asp.net.object-datasource 16182 articles. 0 followers. Follow

3 Replies
422 Views

Similar Articles

[PageSpeed] 14

afaik - you can't - - you've got to have an entity to count the rows - the dataset is the 'finished product' that contains the result of your query - until you've queried and received the data from the database, you don't know how many rows you've received
David Wier
MCP/ASPInsider
ASPNet101.com - where to look first!
Control Grouper - easily control properties for multiple controls with one control!
Calendar Express - The Best HTML Calendar Generator on the web!
(Please 'Mark as Answer' when it applies)
0
augustwind
8/3/2004 8:53:29 PM
o.k. but does .NET have another tool?

may be datareader (i tried "affectedrows") it didn;t worked well...
i just want to know how much thread i have in the table, and i don't want to fill dataset for it...
0
yanivhanya
8/3/2004 9:26:57 PM
if you use count(*) in the query, you can get the count.

select count(*),<other cols> from table where <condition>

hth
***********************
Dinakar Nethi
Life is short. Enjoy it.
***********************
0
ndinakar
8/3/2004 10:16:39 PM
Reply:

Similar Artilces:

How to set the row number and get the row number for ("selected row) in Datagrid
I face a problem that i can't get the selected row of the datagrid in both server side script (VB.net) and client side script (javascript) As i can't use the button column / hyperlink column in the datagrid. Thus , i need to handle the change the background color of the selected row and also to get the selected row number for Update/Delete. Thanks in advance. This depends on how do you perform the selection. Do you want to implement chaning of the SelectedRow at the client side without any postback? If you have no issues with postback, then you can do s little trick here: 1. ...

Get the Row Number or Row ID
Hi, I am using Sybase Central v4.3 with Interactive SQL to query the SQL Commands. My concern is how to get the rownumber or row id in select queries. Is there any in built commands in the ASE. If not please suggest me how to get the rownumber. Thanks.... Unless i'm mistaken, ASE does not use a rowid... it can have a timestamp, but it is updated with every modification to the row. http://infocenter.sybase.com/help/topic/com.sybase.help.ase_15.0.blocks/html/blocks/blocks34.htm -- Cory Sane [TeamSybase] Certified Sybase Associate DBA for ASE 15.0 "Santhanam P" wrote...

The row number and offset of each row in the page should have a matching entry in row number table
Is the proper correction for the following to recreate the table BCPout/IN or table to table insert, or just drop and recreate the index? Row number is 0. Is there a way to correct just the data page? Table Corrupt: The row number and offset of each row in the page should have a matching entry in row number table; check this page (page#=772121 row#=0 offset in row number table=0) Table Corrupt: The row number and offset of each row in the page should have a matching entry in row number table; check this page (page#=772121 row#=0 offset in row number table=0) Table Corrupt: The row...

How do you get the number of rows
I have a gridview and I want to display the total number of rows of data like 5000 rows? This is not the same as the GridView1.Rows.Count, which gives the number of rows being displayed like 10 of 5000 rows. How do I get at the total? Hi, i think what you are asking is how to get the number of rows of the bounded dataset. Lets say you bound a dataset to the grid, you only need to get the number of rows of the first table in the dataset: myDataset.tables(0).rows.count As simple as that!   regards, njs That works in ASP.NET 1.x That doesn't work in ASP.NET 2.0...

get number from row
if i have a this string to select a row from database of acess: select TOP 1 * from odkazy how i elicit from it id column? i need know id from select row then just get the id... select top 1 id from odkazy... PS..you would need an order by clause in the select statement otherwise the TOP has no meaning.. hth***********************Dinakar NethiLife is short. Enjoy it.*********************** my problem: (for example) if i have 5 columns with numbers in select row and i want display cast of this numbers I write: one = ds.tables("Odkazy").Rows(i)("...

How to get record count or row count of rows in reporting service table object?
SSRS 2005.  Let's say I define ONE dataset.  In the page layout I drop in 2 tables.  table1 and table2.  In each of these 2 tables, I add a filter. Let's call the field Active Flag, and I filter on "Y" and "No" respectively.  Now, at the bottom of the report(and not inside the tables themselves) I want to drop 2 textboxes onto the page layout.  I want to get the record count from table1, and the record count in table 2, and place it in each textbox at the bottom of the page that shows the total records per table.  Sounds easy, bu...

How do I get the row number?
I have tryed to find a way to include the row number in a querry but without result. I have a table select some rows ordered and now I will add a column called rank How do I get the rownumber in the field rank ? Thanks in advance Jan O Jan O www.olsmar.com The way I'd suggest assigning a row number to your resultset is to INSERT your resultset into a temporary table or table variable which has an IDENTITY column, something like this: -- set up a table variable to hold the resultset DECLARE @myTable (Rank int identity(1,1) primary_key, ColumnA va...

Can't get dw_1.Object.Data[row] for a row > 32768
Is anyone aware of a problem with passing a row greater than MAX(integer) (32768) to dw_1.Object.Data[row]? I would appreciate a response. Jameel Abdo MCI Systemhouse. I understand that PB5 didn't support object notation for more than 32K rows. It was supposed to be fixed in PB6 (although I haven't confirmed it in PB6, myself). The object notation tended to be a tad flakey in PB5 too (poor null handling, etc.). Many developers decided to stick with the GetItem, SetItem in PB5 to avoid these problems. Jameel Stephen Abdo wrote: > Is anyone aware of a proble...

Get Row Number in Datagrid
Hi I want to delete a databound row in a datagrid using the delete button on the datagrid. I have tried to use Dim RowID As Integer = Convert.ToInt32(shOTQDataGrid1.Items.Item(CInt(e.Item.ItemIndex))) to get the row number. Dim SoqID As Label = CType(shOTQDataGrid1.Items(RowID).FindControl("SOQID"), Label) I need to get the row number(e.g. 0). I search for the specific item "SOQID" and then use a custom Class to delete the record from the Database with the value of SoqID.Text. Dim sh As New ShiftOvertimeQualifiersClass Dim SoqID As Label = CType(shO...

Getting the number of rows in a datagrid
Hi, The datagrid on my webform gets filled with some data from my database. I want to find the number of rows that are populated on the datagrid. What is the way to simply find the number of rows that have been filled with data. I want to use that in a for loop. Thanks, Snigdha After you populate your datagrid with data, all you have to do is:DataGrid.Items.CountThat will give you a count of how many rows are in your grid.DarmarkMark as Answer, if this reply answers your post. Get the row count based on your DataSource....For example, if the DaatSource is DataTable dtTable...it would ...

How to get rowcount or row number
Hello, Sybase experts, I have a table, when I select it I want to display row number as well. E.g. Table T1(c1,c2) c1 c2 --- --- aaa bbb ppp qqq fff ggg .... I want to get results like this: rowno c1 c2 ----- --- --- 1 aaa bbb 2 ppp qqq 3 fff ggg .... If I use: select rowno=@rowcount,c1,c2 from T1 I will get: rowno c1 c2 ----- --- --- 0 aaa bbb 0 ppp qqq 0 fff ggg .... Which is NOT what I want, but how can I do that ? Thank you very much Albert ---== Posted via the PFCGuide Web...

get row number in a sql
Hi, In ASE 12.0 version,how can I get a sequal row number in a single sql? If the sql is: select DeptID,DeptName from Departments I hope the result set is: sequal no dept id dept name 1 101 Finance 2 102 Human 3 103 IT 4 104 Sale Regards, Michael Zhao How about: select identity(32) as "sequal_no", DeptID, DeptName into #foobar from Departments select * from #foobar order by sequal_no drop table #foobar Michael Zhao wrote: > > Hi, > In ASE 12.0 version,how can I get a sequal row numb...

How to get the number of rows that were UPDATED
Using DW.NET 1.0 And VB.NET 71 I have a datastore after Updatadata() i want know the number of rows updated. How to get the number of rows ?? Thanks Peter Stojkovic Try using the RowsAffected property of the Transacation object. Regards, Dave Fish Sybase DataWindow .NET Webcast December 16, 2004: www.customermining.com/Sybase/NETRegPage.html TeamSybase blogs: http://www.teamsybase.net/blogs DataWindow.NET code examples available on CodeXchange: http://datawindownet.codexchange.sybase.com On 16 Dec 2004 05:00:23 -0800, "Peter M�ller" &...

Getting the number of Rows (Records)
How do I get and return the number of rows (records) in a sql 2005 database, Some code samples would be helpful Thanks Joe   Hi, that would be something like this: select count(*) from yourTable The * can also be replaced by a columnname but since I didn't know your table structure I used * in the example. Grz, Kris.Read my blog. Handy Firefox plugins for web developers.Workaround for non working Mark as answer buttons. Ok, guys this isn't going to work. Take a look at my code. I need it to return the current record that was inserted. Is there a was to do that &n...

Web resources about - getting the number of rows... - asp.net.object-datasource

AP Conversation: Cruz's ambitious foreign policy has limits
WASHINGTON (AP) — Ted Cruz says the question follows him into the hallways of foreign capitals around the world. In whispered tones, heads of ...

Microsoft employees serenade Apple employees for 'peace on earth'
After decades of ads mocking each other's products, Apple and Microsoft are hugging out a truce — at least for the holiday season. In the spirit ...

Facebook's CEO and wife to give 99 percent of shares to their new foundation
Reuters Facebook's CEO and wife to give 99 percent of shares to their new foundation Reuters SAN FRANCISCO Mark Zuckerberg will put 99 percent ...

Amazon Dominated 36% of Online Black Friday Sales, Says Slice
Slice Intelligence, which gathers e-commerce data from receipts linked to its Slice package tracking app, tells TechCrunch that Amazon dominated ...

The 10 funniest 'Star Wars' spoofs of all time
Star Wars is a space fantasy, a galactic fairy tale, a Skywalker family soap opera and a classic good vs. evil adventure story with mythological ...

Rosa Parks was a radical, lifelong black liberation activist, not a "meek seamstress"
Jeanne Theoharis, an academic who wrote the biography The Rebellious Life of Mrs. Rosa Parks , reminds us that the historical account of Rosa ...

Samsung launches web browser for its Gear VR headset
Samsung's Gear VR virtual reality headset, which launched in November , provides a solid way to watch a video or show off a demo, but stumbles ...

US sending new special ops force to Iraq to fight IS
WASHINGTON (AP) — For the first time in the year-plus fight against Islamic State militants, the U.S. is putting American combat troops on the ...

Vtech toy data-breach gets worse: 6.3 million children implicated
The Hong Kong-based toymaker/crapgadget purveyor didn't even know it had been breached until journalists from Vice asked why data from its millions ...

Google has found a clever way to make web pages load faster and save your mobile data by up to 70%
Google has a new feature in its Chrome browser for mobile that it thinks could save mobile data by up to 70%. How? By automatically stripping ...

Resources last updated: 12/2/2015 11:14:44 AM