Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: Re: Limit results of a DBI query

by peppiv (Curate)
on Jan 28, 2003 at 16:53 UTC ( #230646=note: print w/ replies, xml ) Need Help??

in reply to Re: Limit results of a DBI query
in thread Limit results of a DBI query

Thanks for the help.

The TOP 10 command didn't work and I've tried putting the "set rowcount" statement in various places but I couldn't get it to work either.

Any other ideas?


Comment on Re: Re: Limit results of a DBI query
Replies are listed 'Best First'.
Re: Re: Re: Limit results of a DBI query
by mpeppler (Vicar) on Jan 28, 2003 at 21:17 UTC
    The "set rowcount" directive applies to physical connection. If for some reason the $dbh->do() command opens a new connection under the covers then it won't work.

    Which DBD driver are you using?


      I'm running an Apache/Linux server using FreeTDS and dbi:Sybase (Thank you) connecting to a Win2K box with MSSQL 7.0. Took a little while to get this all talking.


        OK - the "set rowcount" should work, as long as DBD::Sybase doesn't feel that there are still results pending on a previous statement handle associated with the $dbh - in that case it goes and opens a new connection, which of course defeats the purpose here.


Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://230646]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (7)
As of 2015-11-30 01:56 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (756 votes), past polls