anyway to determine # rows before fetch loop ends and without seperate count(*)

2005-11-16 Thread listmail
#Here's an example which shows what I am trying to accomplish. If I can determine the number of rows before pushing the data, this can simply things for #me when processing the data throught my scripts. # use warnings; use strict; use DBI; use DBD::Oracle; my $sql=q{ select name, location

RE: anyway to determine # rows before fetch loop ends and without seperate count(*)

2005-11-16 Thread Reidy, Ron
The short answer is ... No. The long answer is ... How could the DBI (or the SQL and/or PL/SQL engine for that matter) know in advance of getting the data, how much would be retrieved? According to the concepts manual, part II, chapter 13 for 10gR2: In a single-user database, the user can

Re: anyway to determine # rows before fetch loop ends and without seperate count(*)

2005-11-16 Thread Rob Craig
I am using DBD::mysql and I can get the number of rows by assigning the result of the execute to a scalar: my $rows = $sth-execute or die "Couldn't execute statement: " . DBI-errstr; maybe this doesn't work with DBD::Oracle? Rob [EMAIL PROTECTED] wrote: #Here's an example which shows

Re: anyway to determine # rows before fetch loop ends and without seperate count(*)

2005-11-16 Thread JupiterHost.Net
[EMAIL PROTECTED] wrote: #Here's an example which shows what I am trying to accomplish. If I can determine the number of rows before pushing the data, this can simply things for #me when processing the data throught my scripts. # use warnings; use strict; Good good :) use DBI; use

Re: anyway to determine # rows before fetch loop ends and without seperate count(*)

2005-11-16 Thread Dan Scott
On 11/16/05, Rob Craig [EMAIL PROTECTED] wrote: I am using DBD::mysql and I can get the number of rows by assigning the result of the execute to a scalar: my $rows = $sth-execute or die Couldn't execute statement: . DBI-errstr; maybe this doesn't work with DBD::Oracle? Rob When you

RE: anyway to determine # rows before fetch loop ends and without seperate count(*)

2005-11-16 Thread Rutherdale, Will
It doesn't work according to the DBI documentation. From _Programming the Perl DBI_, p. 223 (for example): For SELECT statements, execute simply starts the query within the database engine. Use one of the fetch methods to retrieve the data after calling execute. The execute method does _not_

Can't connect to MySQL server (99)

2005-11-16 Thread Badai Aqrandista
Hi All, I am using Apache::DBI in a mod_perl environment. Intermittently, I get the following error message: DBI connect('host=db-server.net;database=elres','elres',...) failed: Can't connect to MySQL server on 'db-server.net' (99) I read in MySQL documentation that their server error

Re: Can't connect to MySQL server (99)

2005-11-16 Thread Mike Blezien
System error: 99 = Cannot assign requested address. are you using the correct host?? Badai Aqrandista wrote: Hi All, I am using Apache::DBI in a mod_perl environment. Intermittently, I get the following error message: DBI connect('host=db-server.net;database=elres','elres',...) failed:

Re: Can't connect to MySQL server (99)

2005-11-16 Thread Badai Aqrandista
System error: 99 = Cannot assign requested address. are you using the correct host?? Yes, definitely. This error occurs intermittently. Most of the time the code works, but sometime it doesn't and throws this error. I don't think it is related to load because sometime this error happens in

Re: Can't connect to MySQL server (99)

2005-11-16 Thread garbaro
Where is the database located? Is it local or remote? You might be experiencing lost of connection to the host. If your using a URL instead of the IP address you should check that the DNS server you are using works fine, etc. In resume, it could be a lot of things related to connectivity.

DBD::Oracle

2005-11-16 Thread piet paaltjens
Dear Jay, some time ago you've helped me to try and get Oracleinstantclient 10.2 to work on my machine. You even sent me your installed software. For me, alas, it did not work. Just to let you know, recently I've found info about how to install Oracle 9 and/or 10 on Fedora Core. Now