Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Interfaces Odbc > Re: get number ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 10 of 12 Topic 2335 of 2443
Post > Topic >>

Re: get number of rows selected

by andyk@[EMAIL PROTECTED] (Andrei Kovalevski) Apr 7, 2008 at 04:30 AM

This is a multi-part message in MIME format.
--------------090906070702000905030802
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit

Hello,

Take a look at SQLRowCount( 
http://msdn2.microsoft.com/en-us/library//ms711835.aspx
). You may note:

*/For other statements and functions, the driver may define the value 
returned in *RowCountPtr. For example, some data sources may be able to 
return the number of rows returned by a SELECT statement or a catalog 
function before fetching the rows./*

You may rely on this when using  psqlODBC or  ODBCng with buffering mode 
ON (default).

Adam M wrote:
> Generally you would do that with a count function instead of relying
> on something else.
>
> "select * from layer where visible = 1"
>
> so I guess "SELECT COUNT(*) FROM layer WHERE visible=1" would give you
> the answer.
>
> - Adam
>   
-- 
Andrei Kovalevski
PostgreSQL Replication, Consulting, Custom Development, 24x7 sup****t
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/


--------------090906070702000905030802
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
  <title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,<br>
<br>
Take a look at SQLRowCount(
<a class="moz-txt-link-freetext"
href="http://msdn2.microsoft.com/en-us/library//ms711835.aspx">http://msdn2.microsoft.com/en-us/library//ms711835.aspx</a>
). You may note:<br>
<br>
<tt><b><i>For other statements and functions, the driver may define the
value returned in *RowCountPtr. For example, some data sources may be
able to return the number of rows returned by a SELECT statement or a
catalog function before fetching the rows.</i></b></tt><br>
<br>
You may rely on this when using&nbsp; psqlODBC or&nbsp; ODBCng with
buffering
mode ON (default).<br>
<br>
Adam M wrote:
<blockquote
 cite="mid:84b37b360804030930o1b771e47ib9082bf3cecb54f6@[EMAIL PROTECTED]
"
 type="cite">
  <pre wrap="">Generally you would do that with a count function instead
of relying
on something else.

"select * from layer where visible = 1"

so I guess "SELECT COUNT(*) FROM layer WHERE visible=1" would give you
the answer.

- Adam
  </pre>
</blockquote>
<pre class="moz-signature" cols="72">-- 
Andrei Kovalevski
PostgreSQL Replication, Consulting, Custom Development, 24x7 sup****t
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, ODBCng - <a class="moz-txt-link-freetext"
href="http://www.commandprompt.com/">http://www.commandprompt.com/</a>
</pre>
</body>
</html>

--------------090906070702000905030802--
 




 12 Posts in Topic:
get number of rows selected
paul.malm@[EMAIL PROTECTE  2008-04-03 15:20:04 
Connection of postgres
l7nguyen@[EMAIL PROTECTED  2008-04-03 21:04:05 
Re: Connection of postgres
andyk@[EMAIL PROTECTED]   2008-04-07 04:35:57 
Re: Connection of postgres
l7nguyen@[EMAIL PROTECTED  2008-04-07 08:38:19 
Re: Connection of postgres
andyk@[EMAIL PROTECTED]   2008-04-07 05:26:00 
Re: Connection of postgres
l7nguyen@[EMAIL PROTECTED  2008-04-07 09:40:03 
Re: Connection of postgres
rod@[EMAIL PROTECTED] (&  2008-04-07 16:05:09 
Re: Connection of postgres
l7nguyen@[EMAIL PROTECTED  2008-04-08 01:02:30 
Re: get number of rows selected
gnuman1@[EMAIL PROTECTED]  2008-04-03 11:30:07 
Re: get number of rows selected
andyk@[EMAIL PROTECTED]   2008-04-07 04:30:16 
Re: Connection of postgres
gnuman1@[EMAIL PROTECTED]  2008-04-09 13:40:28 
Re: Connection of postgres
l7nguyen@[EMAIL PROTECTED  2008-04-10 01:57:41 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Mon Dec 1 16:30:51 CST 2008.