473,503 Members | 1,656 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Number of rows

How can I get the number of rows in MS Access table?

I know how to do that through the BindingManager, but in that case I need to
have Grid control.

int numRows =
dataGridDetails.BindingContext[dataGridDetails.DataSource,
dataGridDetails.DataMember].Count;

I would like to know how to get some int value, row numbers.

Thanks :)
Nov 17 '05 #1
9 2654
Hi,
Do a query like "select count(*) from table1 " it will return the number
of rows.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Washington" <ab******@yahoo.com> wrote in message
news:uc**************@TK2MSFTNGP14.phx.gbl...
How can I get the number of rows in MS Access table?

I know how to do that through the BindingManager, but in that case I need
to have Grid control.

int numRows =
dataGridDetails.BindingContext[dataGridDetails.DataSource,
dataGridDetails.DataMember].Count;

I would like to know how to get some int value, row numbers.

Thanks :)

Nov 17 '05 #2
Hi,
Do a query like "select count(*) from table1 " it will return the number
of rows.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Washington" <ab******@yahoo.com> wrote in message
news:uc**************@TK2MSFTNGP14.phx.gbl...
How can I get the number of rows in MS Access table?

I know how to do that through the BindingManager, but in that case I need
to have Grid control.

int numRows =
dataGridDetails.BindingContext[dataGridDetails.DataSource,
dataGridDetails.DataMember].Count;

I would like to know how to get some int value, row numbers.

Thanks :)

Nov 17 '05 #3
I know that and Max option within SQL too but I am not sure how I can get
int value from select query?
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:OL*************@tk2msftngp13.phx.gbl...
Hi,
Do a query like "select count(*) from table1 " it will return the number
of rows.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Washington" <ab******@yahoo.com> wrote in message
news:uc**************@TK2MSFTNGP14.phx.gbl...
How can I get the number of rows in MS Access table?

I know how to do that through the BindingManager, but in that case I need
to have Grid control.

int numRows =
dataGridDetails.BindingContext[dataGridDetails.DataSource,
dataGridDetails.DataMember].Count;

I would like to know how to get some int value, row numbers.

Thanks :)


Nov 17 '05 #4
I know that and Max option within SQL too but I am not sure how I can get
int value from select query?
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:OL*************@tk2msftngp13.phx.gbl...
Hi,
Do a query like "select count(*) from table1 " it will return the number
of rows.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Washington" <ab******@yahoo.com> wrote in message
news:uc**************@TK2MSFTNGP14.phx.gbl...
How can I get the number of rows in MS Access table?

I know how to do that through the BindingManager, but in that case I need
to have Grid control.

int numRows =
dataGridDetails.BindingContext[dataGridDetails.DataSource,
dataGridDetails.DataMember].Count;

I would like to know how to get some int value, row numbers.

Thanks :)


Nov 17 '05 #5
what about a SqlCommand.ExecuteScaler?

also IIRC you are working with access ( from other threads I answered you
before ) so you will have to change from sql provider to oledb.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Washington" <ab******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I know that and Max option within SQL too but I am not sure how I can get
int value from select query?
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
wrote in message news:OL*************@tk2msftngp13.phx.gbl...
Hi,
Do a query like "select count(*) from table1 " it will return the number
of rows.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Washington" <ab******@yahoo.com> wrote in message
news:uc**************@TK2MSFTNGP14.phx.gbl...
How can I get the number of rows in MS Access table?

I know how to do that through the BindingManager, but in that case I
need to have Grid control.

int numRows =
dataGridDetails.BindingContext[dataGridDetails.DataSource,
dataGridDetails.DataMember].Count;

I would like to know how to get some int value, row numbers.

Thanks :)



Nov 17 '05 #6
what about a SqlCommand.ExecuteScaler?

also IIRC you are working with access ( from other threads I answered you
before ) so you will have to change from sql provider to oledb.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Washington" <ab******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I know that and Max option within SQL too but I am not sure how I can get
int value from select query?
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
wrote in message news:OL*************@tk2msftngp13.phx.gbl...
Hi,
Do a query like "select count(*) from table1 " it will return the number
of rows.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Washington" <ab******@yahoo.com> wrote in message
news:uc**************@TK2MSFTNGP14.phx.gbl...
How can I get the number of rows in MS Access table?

I know how to do that through the BindingManager, but in that case I
need to have Grid control.

int numRows =
dataGridDetails.BindingContext[dataGridDetails.DataSource,
dataGridDetails.DataMember].Count;

I would like to know how to get some int value, row numbers.

Thanks :)



Nov 17 '05 #7
Ignacio, thank you very much, it is great :)

Thanks :)

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:eP**************@tk2msftngp13.phx.gbl...
what about a SqlCommand.ExecuteScaler?

also IIRC you are working with access ( from other threads I answered you
before ) so you will have to change from sql provider to oledb.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Washington" <ab******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I know that and Max option within SQL too but I am not sure how I can get
int value from select query?
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
wrote in message news:OL*************@tk2msftngp13.phx.gbl...
Hi,
Do a query like "select count(*) from table1 " it will return the
number of rows.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Washington" <ab******@yahoo.com> wrote in message
news:uc**************@TK2MSFTNGP14.phx.gbl...
How can I get the number of rows in MS Access table?

I know how to do that through the BindingManager, but in that case I
need to have Grid control.

int numRows =
dataGridDetails.BindingContext[dataGridDetails.DataSource,
dataGridDetails.DataMember].Count;

I would like to know how to get some int value, row numbers.

Thanks :)



Nov 17 '05 #8
Ignacio, thank you very much, it is great :)

Thanks :)

"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us> wrote
in message news:eP**************@tk2msftngp13.phx.gbl...
what about a SqlCommand.ExecuteScaler?

also IIRC you are working with access ( from other threads I answered you
before ) so you will have to change from sql provider to oledb.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation
"Washington" <ab******@yahoo.com> wrote in message
news:%2****************@TK2MSFTNGP14.phx.gbl...
I know that and Max option within SQL too but I am not sure how I can get
int value from select query?
"Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
wrote in message news:OL*************@tk2msftngp13.phx.gbl...
Hi,
Do a query like "select count(*) from table1 " it will return the
number of rows.

cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"Washington" <ab******@yahoo.com> wrote in message
news:uc**************@TK2MSFTNGP14.phx.gbl...
How can I get the number of rows in MS Access table?

I know how to do that through the BindingManager, but in that case I
need to have Grid control.

int numRows =
dataGridDetails.BindingContext[dataGridDetails.DataSource,
dataGridDetails.DataMember].Count;

I would like to know how to get some int value, row numbers.

Thanks :)



Nov 17 '05 #9
dood1984
1 New Member
Extreeem Thank yoiu for Ignacio Machin, u r the best. Thanks.
> what about a SqlCommand.ExecuteScaler?
>
> also IIRC you are working with access ( from other threads I answered you
> before ) so you will have to change from sql provider to oledb.
>
> cheers,
>
> --
> Ignacio Machin,
> ignacio.machin AT dot.state.fl.us
> Florida Department Of Transportation
>
>
> "Washington" <ablyplus@yahoo.com> wrote in message
> news:%23s4neyirFHA.3452@TK2MSFTNGP14.phx.gbl...[color=green]
>>I know that and Max option within SQL too but I am not sure how I can get
>>int value from select query?
>>
>>
>> "Ignacio Machin ( .NET/ C# MVP )" <ignacio.machin AT dot.state.fl.us>
>> wrote in message news:OLjzipirFHA.908@tk2msftngp13.phx.gbl...[color=darkred]
>>> Hi,
>>>
>>>
>>> Do a query like "select count(*) from table1 " it will return the
>>> number of rows.
>>>
>>> cheers,
>>>
>>> --
>>> Ignacio Machin,
>>> ignacio.machin AT dot.state.fl.us
>>> Florida Department Of Transportation
>>>
>>>
>>>
>>> "Washington" <ablyplus@yahoo.com> wrote in message
>>> news:ucuXsUirFHA.1684@TK2MSFTNGP14.phx.gbl...
>>>> How can I get the number of rows in MS Access table?
>>>>
>>>> I know how to do that through the BindingManager, but in that case I
>>>> need to have Grid control.
>>>>
>>>> int numRows =
>>>> dataGridDetails.BindingContext[dataGridDetails.DataSource,
>>>> dataGridDetails.DataMember].Count;
>>>>
>>>> I would like to know how to get some int value, row numbers.
>>>>
>>>> Thanks :)
>>>>
>>>
>>>[/color]
>>
>>[/color]
>
>[/color]
May 3 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
24088
by: Xizor | last post by:
Ok, what I want to do is find out the number of rows in a table. The most obvious solution is to do something like the following: $sql = "SELECT blah FROM blah WHERE 1"; $result =...
7
12034
by: Egor Shipovalov | last post by:
I'm implementing paging through search results using cursors. Is there a better way to know total number of rows under a cursor than running a separate COUNT(*) query? I think PostgreSQL is bound...
0
5750
by: D. Dante Lorenso | last post by:
I need to know that original number of rows that WOULD have been returned by a SELECT statement if the LIMIT / OFFSET where not present in the statement. Is there a way to get this data from PG ?...
5
1915
by: ad | last post by:
There are about 40 items in my DropDownList, Can I set the number of dropdown rows more?
12
3016
by: Martin Heuckeroth | last post by:
Hi Any idea on how to get a row number from the original table? We do a query and get a result. The row number from the result is different from the rownumber of the table the result originated...
2
11102
by: patang | last post by:
I found the following to count the total number of VISIBLE rows of datagrid datagrid.visiblerowcount How do we count the total number of ACTUAL (not just visible) rows of datagrid? Thanks...
6
4957
by: Ward Germonpré | last post by:
Hi, I have a reference to a dom table. How can I retrieve the number of columns in that table ? The stop value below doesn't work, nor did my experimenting with tbodies and childNodes.. .......
0
6169
by: sysmanint1 | last post by:
I am a total neophyte at Visual Basic but found the following post and reply from Clint concerning a dynamic range. Also, have never "posted" to a discussion I have made a macro that works on...
8
783
by: sqlservernewbie | last post by:
Hi Everyone, Here is a theoretical, and definition question for you. In databases, we have: Relation
17
60003
by: SimonPalmer | last post by:
anyone know how I would find out how many rows are in a csv file? I can't find a method which does this on csv.reader. Thanks in advance
0
7198
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7271
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7319
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
6979
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5570
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4998
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3149
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
373
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.