Redirecting request in pl script

2002-10-03 Thread vikas mehta
Hi Is there any eqvivalent of RequestDispatcher or pageContext.forward() of Servlet/JSP in perl What i want to do .evaluate some expression if(expression=value1) { redirect("Page1.html") } else { redirect("Page2.html") }

OT: Re: Redirecting request in pl script

2002-10-03 Thread Simon Oliver
perldoc CGI GENERATING A REDIRECTION HEADER print $query->redirect('http://somewhere.else/in/movie/land'); -- Simon Oliver

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread shildreth
If you are doing selects, you can set the $dbh->RowCacheSize, perldoc DBI will tell you what you need to know. On 02-Oct-2002 John-Thomas Beadles wrote: > Help! I'm having a severe performance problem with a Perl program talking > to a remote Oracle database. I've read the DBI & DBM perldocs,

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread Joe Raube
Are the versions of perl, dbi, dbd, and the Oracle client the same on both machines? What OS is running on each machine? -Joe --- [EMAIL PROTECTED] wrote: > > If you are doing selects, you can set the $dbh->RowCacheSize, > perldoc DBI will tell you what you need to know. > > On 02-Oct-2002 J

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread Joe Raube
Also, did you execute the query using SQL*Plus on each machine and note the performance? -Joe --- Joe Raube <[EMAIL PROTECTED]> wrote: > Are the versions of perl, dbi, dbd, and the Oracle client the same > on > both machines? > > What OS is running on each machine? > > -Joe > > --- [EMAIL PRO

RE: Redirecting request in pl script

2002-10-03 Thread Howard Fuchs
Try print "Location: http://my.server.com/Page1.htm\n\n";; -Original Message- From: vikas mehta [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 5:17 AM To: [EMAIL PROTECTED] Subject: Redirecting request in pl script Hi Is there any eqvivalent of RequestDispatcher or pageC

RE: Database to Excel script...

2002-10-03 Thread NIPP, SCOTT V (SBCSI)
I am trying to do the cell formatting now and I am running into an error message: Can't locate object method "set_column" via package "Spreadsheet::WriteExcel" at ./oncall_report.pl line 23. Here is the line of the script... $xls->set_column(6, 7, 50); I am not sure what is wr

RE: Database to Excel script...

2002-10-03 Thread Sterin, Ilya
Where did you get the set_column method, I don't even see one in perldoc? Ilya -Original Message- From: NIPP, SCOTT V (SBCSI) To: Sterin, Ilya; ''Jeff Zucker' '; 'dbi-users ' Sent: 10/3/02 8:29 AM Subject: RE: Database to Excel script... I am trying to do the cell formatting now and

RE: Database to Excel script...

2002-10-03 Thread Sterin, Ilya
This is getting pretty OT as well. So possibly you can either ask in person, or on comp.lang.perl.misc Thanks. Ilya -Original Message- From: NIPP, SCOTT V (SBCSI) To: Sterin, Ilya; ''Jeff Zucker' '; 'dbi-users ' Sent: 10/3/02 8:29 AM Subject: RE: Database to Excel script... I am t

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread John-Thomas Beadles
The query ran in 9 minutes on SQLplus on the UNIX machine in question (talking across to the remote target DB). The same query ran in under 1 min on the PC. -Original Message- From: Joe Raube [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 8:44 AM To: [EMAIL PROTECTED] Cc: [

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread Joe Raube
Then I don't believe this is a dbi issue; most likely a difference in configuration at the Oracle client or OS level. Where does the database reside (what machine) ? What is the configuration of each machine as far as CPU, memory, etc? Does the Unix machine have anything else running on it? Wh

FW: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread John-Thomas Beadles
Forgot to copy my response to the list... -Original Message- From: Beadles, John-Thomas [RICH1:2795:EXCH] The PC is running Win2k, perl 5.6.1, dbi 1.28, dbd-oracle 1.80 The UNIX machine is running HPUX10, with Perl v5.6.0, dbi 1.14, dbd-oracle - can't tell, don't have access to the mod

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread Jesse, Rich
If you're still running HPUX 10.x, I'm guessing that it's also an older machine? It's probably not a memory issue, since SQL*Plus won't store the 38K rows in memory. There's some memory use, but it's more for buffering. On your HP box, fire up "top" in another window while re-running that query

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread John-Thomas Beadles
Joe, This may very well be getting off topic for this list. I just needed to check with y'all to see if there was anything in the DBI I was missing that would impact. "No" is an appropriate answer. Should I drop the list off replies? Anyway, here are the answers to your questions - The PC (qu

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread John-Thomas Beadles
Rich, Boy, been a while since I've done this - Top shows nowhere near 100%. User CPU hit about 0.2%, sqlplus was 30% while the query was actually running. -Original Message- From: Jesse, Rich [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 10:30 AM To: Beadles, John-Thomas

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread shildreth
Ah yes, there was a bug in DBD::Oracle. I forget which version numbers, you can add my $foo = $sth->{NAME} before the $sth->execute which will start the caching. Which version of DBD::Oracle are you using? .. Not that this affects performance, but you can set your sql by, my

Re: Bug in DBD-ODBC 0.45_16

2002-10-03 Thread Roger Perttu
Jeff, I've been busy but finally managed to test the new version. It still fails my test. Jeff Urlwin wrote: >Roger, > >I've finally had a chance to look at this (going through my queue of issues >& questions). What I can see is the following: > - No result columns are being returned >

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread John-Thomas Beadles
Hm, I'll try that. However, the listener appears to be down now, so I can't try it just yet. Not sure about the DBD Oracle version, not sure how to find the physical module. Is there another way to tell? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Ah yes,

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread shildreth
perl -MDBD::Oracle -e 'print $DBD::Oracle::VERSION, "\n"' On 03-Oct-2002 John-Thomas Beadles wrote: > Hm, I'll try that. However, the listener appears to be down now, so I can't > try it just yet. > > Not sure about the DBD Oracle version, not sure how to find the physical > module. Is ther

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread John-Thomas Beadles
Thanks. v1.03 on the Unix side, v1.8 on the PC. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 11:02 AM To: Beadles, John-Thomas [RICH1:2795:EXCH] Cc: [EMAIL PROTECTED] Subject: RE: Performance problem with DBI, DBD-Oracle8 perl

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread shildreth
I'm sure you are aware of this, but the DBI/DBD::Oracle are very old on that server. On 03-Oct-2002 John-Thomas Beadles wrote: > Thanks. v1.03 on the Unix side, v1.8 on the PC. > > -Original Message- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: Thursday, October 03, 200

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread John-Thomas Beadles
Yep, it looks like. I think you might have a winner with that $foo = $sth->name suggestion. I just tried it and the query ran in 13 secs. I'm pulling it back out now, to see if it does the same thing. Keeping my fingers crossed. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread John-Thomas Beadles
Bingo, we have a winner! I've alternated including this statement, and it definitely appears to be the key, at least for this test code. Now I have to go modify my production code. I'll let you know if it works the same way. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PRO

Re: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread Tim Bunce
Make sure you're using the latest DBD::Oracle. Send a trace(8) log - just the part from prepare thru execute. Tim. On Wed, Oct 02, 2002 at 05:45:01PM -0500, John-Thomas Beadles wrote: > Help! I'm having a severe performance problem with a Perl program talking > to a remote Oracle database. I'v

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread Sterin, Ilya
Why can't you access the DBI FAQ? www.xmlproj.com/cgi/fom.cgi Ilya -Original Message- From: Tim Bunce To: John-Thomas Beadles Cc: [EMAIL PROTECTED] Sent: 10/3/02 3:31 AM Subject: Re: Performance problem with DBI, DBD-Oracle8 Make sure you're using the latest DBD::Oracle. Send a trace(8

Re: fetch_row array and aggregates

2002-10-03 Thread Tim Bunce
Use trace() Tim. On Wed, Oct 02, 2002 at 04:16:21PM -0500, Bill Hamilton wrote: > I am using DBI on NT4 , Informix 7.24 on a Sun box. > The dbi driver is ADO. > I seem to have a bug someplace when an aggregate function is used with >fetchrow_array. > Consider... > > $salessel = qq/SELECT sum(s

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread John-Thomas Beadles
Ilya, That url gives me a page not found error, or did, until just now Couldn't all day yesterday. The URL at lists.perl.org was different, and didn't work either.. Not that I can get to that, either, right now. -Original Message- From: Sterin, Ilya [mailto:[EMAIL PROTECTED]] Sent: T

fetchrow_array

2002-10-03 Thread chad kellerman
Hi everyone, I thought $sth->fetchrow_array would do the trick but its not. I am using mysql on linux and I have a query: SELECT hostname FROM tblHost WHERE status="started"; which returns a list of hostnames. I though the fetchrow_array would return a array of hostnames but it does not se

RE: fetchrow_array

2002-10-03 Thread Sterin, Ilya
It's doing what it is supposed to. Fetches the first row, which only has one record. The reason it has an array in it, is because it would fetch an array if you selected more than one column. Now, you can either iterate using while through each row and push() into an array, or... use selectrow

Re: fetchrow_array

2002-10-03 Thread Ronald J Kimball
On Thu, Oct 03, 2002 at 03:59:48PM -0400, chad kellerman wrote: > Hi everyone, > >I thought $sth->fetchrow_array would do the trick but its not. I am > using mysql on linux and I have a query: > > SELECT hostname FROM tblHost WHERE status="started"; > > which returns a list of hostnames.

alternative to $sth->{PRECISION}

2002-10-03 Thread R. Steven Rainwater
I have some code that relies on getting the column name, type, and width, which I am porting for use with PostgreSQL and DBD::Pg. No problem with the name and type attributes but width relies on the $sth->{PRECISION} statement handle attribute which isn't supported in DBD::Pg. Is there any alte

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread John-Thomas Beadles
It's definite. I implemented it all through my code and dropped the execution time from 40+ minutes to approximately 4.5 minutes. I've notified the sys admin to the problem, see if we can implement a global solution. Thanks a bunch, guys! -Original Message- From: Beadles, John-Thomas [R

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread shildreth
Have him update your DBI & DBD::Oracle to the latest versions. (1.30) & (1.12) On 03-Oct-2002 John-Thomas Beadles wrote: > It's definite. I implemented it all through my code and dropped the > execution time from 40+ minutes to approximately 4.5 minutes. I've notified > t

RE: Performance problem with DBI, DBD-Oracle8

2002-10-03 Thread John-Thomas Beadles
Yep, that'd be preferred. The production server is nearly new, but I don't know if they are using new modules or not. Scary! Thank you very much, you've saved me tons of time! -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, October 03, 2002 3:31

Re: Strange "silent" login failures with DBD::Oracle

2002-10-03 Thread Jesse, Rich
Hey Tim, Sorry I didn't get back to you sooner -- seems like MS Outlook (or "Lookout!") decided not to give me your reply. I've tried the level 9 trace -- I'm not exactly sure what it is I'm looking for, but this seems to be an important area: <- connect= DBI::db=HASH(0x16ce78) at /apps/p

Re: DBI::Profile meets Devel::DProf?

2002-10-03 Thread Sam Tregar
On Tue, 1 Oct 2002, Tim Bunce wrote: > > - Build the sub-class in such a way that it does not accumulate > > profiling data in-memory without limit. Devel::DProf and > > Devel::Profiler accomplish this by doing buffered writes of raw deltas > > into the data file and only assemblin

FW: CPAN Upload: I/IS/ISTERIN/DBIx-Dump-0.03.tar.gz

2002-10-03 Thread Sterin, Ilya
Version 0.03 now allows an event driven interface to transformations. You can define an event handler, and transform values as you'd like if custom formating is needed. Here is an example... # use DBI; use DBI::Dump; my $dbh = DBI->connect(...); my $sth = $dbh->pr

Re: alternative to $sth->{PRECISION}

2002-10-03 Thread Michael A Chase
On Thu, 03 Oct 2002 15:30:00 -0500 "R. Steven Rainwater" <[EMAIL PROTECTED]> wrote: > I have some code that relies on getting the column > name, type, and width, which I am porting for use with > PostgreSQL and DBD::Pg. No problem with the name and type > attributes but width relies on the $sth

AnyData Conversion (Was Re: Uploaded to CPAN: DBIx::Dump)

2002-10-03 Thread Jeff Zucker
Sterin, Ilya wrote: > That would be fine. I was thinking in terms of supporting data formats that > can't be queried, Yes, there are already some like that, for example one can query Mp3 file embedded text tags, but not create or modify them. > AnyData.pm, I haven't looked at the source,

RE: Uploaded to CPAN: DBIx::Dump

2002-10-03 Thread Sterin, Ilya
That would be fine. I was thinking in terms of supporting data formats that can't be queried, though why DBD is sort of not an issue here. Though AnyData.pm, I haven't looked at the source, I'm not sure if Jeff wants to add these misceleneous data structures. Also... I just added an event driv

Re: Uploaded to CPAN: DBIx::Dump

2002-10-03 Thread Randal L. Schwartz
> "Ilya" == Ilya Sterin <[EMAIL PROTECTED]> writes: Ilya> DBIx::Dump allows to dump DBI result set into a variety of formats like Ilya> Excel, CSV, XML, etc... Ilya> Right now, it only dumps to Excel, tomorrow's release will dump into CSV as Ilya> well, then sometime this week it will dump i