RE: RaiseError sticks with statement handle??

2002-10-24 Thread Fox, Michael
Nope, just set it directly on the statement handle $sth-{RaiseError} = 1 instead of on the parent $dbh -Original Message- From: Mark Dedlow [mailto:mtdedlow;lbl.gov] Sent: Thursday, October 24, 2002 1:06 PM To: Dbi-Users Subject: RaiseError sticks with statement handle?? RaiseError

RE: RaiseError sticks with statement handle??

2002-10-24 Thread Mark Dedlow
Thanks to several for pointing out the answer. I had indeed read the fine manual, but I conceptually missed the fact that RaiseError could apply to statement handles, and not just database handles. I can see the utility in that now, but I can also see much utility in having a connection scope

Re: RaiseError sticks with statement handle??

2002-10-24 Thread Michael A Chase
Thanks to several for pointing out the answer. I had indeed read the fine manual, but I conceptually missed the fact that RaiseError could apply to statement handles, and not just database handles. I can see the utility in that now, but I can also see much utility in having a connection

Re: RaiseError sticks with statement handle??

2002-10-24 Thread Tim Bunce
On Thu, Oct 24, 2002 at 12:33:17AM -0700, Mark Dedlow wrote: which is what I now realize I have to do if I don't know the RaiseError status of the statement handles. It seems to me that most of the code-neatness value that I often see cited for RaiseError and eval blocks is lost. In

Re: Migrate from MySQL to Oracle 8i

2002-10-24 Thread Tim Bunce
On Thu, Oct 24, 2002 at 02:00:18AM +0100, Simon Windsor wrote: Hi Is there a perl/dbi programme to convert a MySQL dump file to an Oracle Format ? I know of Oracle's Migration Workbench, but it keeps crashing when trying to establish a JDBC connect to MySQL. I've attached a tool I

Re: DBD:PgPP

2002-10-24 Thread Stephan Harren
Does anybody know why DBD:PG make test fails the 04execute test, tests 5-7 ? Using Linux 2.4.18 DBI 1.20 DBD::Pg 1.13 postgresql-7.2.3 Best regards, Stephan

Re: DBD::Oracle and FreeBSD

2002-10-24 Thread Scott T. Hildreth
On 22-Oct-2002 Matthew Lineen wrote: - if you are using an Linux Oracle install, you need to compile a linux perl and use that. I'd rather not, so I'll go w/ your advice on point #2. - if you've installed the Oracle7 client libraries, /usr/ports/databases/oracle7, then you

Re: DBD:PgPP

2002-10-24 Thread Juha-Mikko Ahonen
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Thursday 24 October 2002 12:06, Stephan Harren wrote: Does anybody know why DBD:PG make test fails the 04execute test, tests 5-7 ? Using Linux 2.4.18 DBI 1.20 DBD::Pg 1.13 postgresql-7.2.3 It is a bug in the 04execute.t file. It has:

Re: Creating wrapped PL/SQL packages using DBI

2002-10-24 Thread Steve Baldwin
Thanks Chris, I have tried this on DBI 1.30 and DBD::Oracle 1.12, but see exactly the same behaviour. I suspect it is a DBD::Oracle thing coz as far as I know, named bind variables (as opposed to ?) is an Oracle thing. I have ended up doing the same as you did, but I hate ugly kludges, and

RE: Creating wrapped PL/SQL packages using DBI

2002-10-24 Thread Sarnowski, Chris
I ran into a similar problem with the '?' character with an earlier version of DBD:Oracle (possibly 1.03, maybe older) a couple of years ago. My (ugly) workaround was to invoke SQLPlus on a pipe and have it compile the package. open SQLSESSION, |\$ORACLE_HOME/bin/sqlplus -S ; print

Fwd: Creating wrapped PL/SQL packages using DBI

2002-10-24 Thread Steve Baldwin
I didn't hear any response on this. Can anyone please help me ? Thanks, Steve -- Forwarded Message -- Subject: Creating wrapped PL/SQL packages using DBI Date: Tue, 22 Oct 2002 11:25:24 +1000 From: Steve Baldwin [EMAIL PROTECTED] To: [EMAIL PROTECTED] I'm writing a perl

How do I return vacuum output, DBD-Pg

2002-10-24 Thread Anders Bogdan
Kind of a newbie-ish question I guess. I could not find a good answer in the faq or the Perl DBI book. I'm writing a bit of database maintenance and need to save the output from the postgresql vacuum command, but it apparently writes to standard error rather than return the info. All I get is

Re: DBD:Pg

2002-10-24 Thread Stephan Harren
In your connect parameters, pass RaiseError = 1 and try this: eval { $st2-execute }; if (my $err = $) { adminmail($err), exec($workdir/msmonbackup.pl); } Exceptions are your friends! A, thanks ! Great idea. I'll try Best regards, Stephan

Re: DBD:Pg

2002-10-24 Thread David Wheeler
On Thursday, October 24, 2002, at 09:26 AM, Stephan Harren wrote: adminmail($DBI::errstr),exec ($workdir/msmonbackup.pl) if (!$st2-execute); Nothing is passed to the adminmail-function ! In your connect parameters, pass RaiseError = 1 and try this: eval { $st2-execute }; if (my $err =

DBD:Pg

2002-10-24 Thread Stephan Harren
Hi All, is there any possibility to not die while doing an execute and hold the error message? Example1: $db1=DBI-connect(dbi:Pg:dbname=$cfg{dbname};host=$cfg{dbhost};port=$cfg{dbport},$cfg{dbuser},$cfg{dbpassword},{PrintError=0,AutoCommit= 1}) or adminmail($DBI::errstr),exec

Re: DBD:PgPP

2002-10-24 Thread Stephan Harren
Those are designed to be run by the maintainer. Are you setting the DBDPG_MAINTAINER environment variable? Yes, set to 1. Best regards, Stephan

Re: DBD:PgPP

2002-10-24 Thread David Wheeler
On Thursday, October 24, 2002, at 02:06 AM, Stephan Harren wrote: Does anybody know why DBD:PG make test fails the 04execute test, tests 5-7 ? Those are designed to be run by the maintainer. Are you setting the DBDPG_MAINTAINER environment variable? David -- David Wheeler

Re: BCP Sybase 12.5

2002-10-24 Thread Michael Peppler
On Thu, 2002-10-24 at 07:52, ANSETT, Kevin, FM wrote: All, Appreciate any help. I am currently trying to bcp some data into a Sybase 12.5 database. Now code works on an 11.9 DB, but not on 12.5. Heres a snippet of the bcp function. This should probably be taken to the sybperl-l

BCP Sybase 12.5

2002-10-24 Thread ANSETT, Kevin, FM
All, Appreciate any help. I am currently trying to bcp some data into a Sybase 12.5 database. Now code works on an 11.9 DB, but not on 12.5. Heres a snippet of the bcp function. $sql = ; open (FH, $statfile) || die Couldn't open $statfile: $!; my lines = FH; close FH ||

Problem with set DB2_HOME environment variable during install DBD:DB2

2002-10-24 Thread Limei Zhang
Hi, there, I am using DB2 Runtime client (V7.2) on linux redhat 7.3. I am try to install DBD:DB2 (0.76)that I can run perl program to remote access database in the DB2 server. I have successfully install DBI. When I do Perl Makefile.PL It failed, and the error message is DB2_HOME environment

Re: Problem with set DB2_HOME environment variable during install DBD:DB2

2002-10-24 Thread Darin McBride
On October 24, 2002 07:20 pm, Limei Zhang wrote: Hi, there, I am using DB2 Runtime client (V7.2) on linux redhat 7.3. I am try to install DBD:DB2 (0.76)that I can run perl program to remote access database in the DB2 server. You need to use the Application Development Client to compile the