Is there any way to restart the failed transaction from
within the HandleError sub? I cannot find anything in
the DBI doc's that allows me to tell what the last op
on the dbh was.
thanx
--
Steven Lembark [EMAIL PROTECTED]
Systems Management Phone:
Are you talking about $dbh-{Statement} ?
If you want full transactional integrity and you've been sending
multiple statements within the transaction, you could overload execute()
and track every time there's an open tran or commit in the
statement. Anything in between, you store in an array of
-- Henri Asseily [EMAIL PROTECTED]
Are you talking about $dbh-{Statement} ?
If you want full transactional integrity and you've been sending multiple
statements within the transaction, you could overload execute() and track
every time there's an open tran or commit in the statement.
On Mon, 15 Dec 2003 [EMAIL PROTECTED] wrote:
Howdy,
If I'm handling errors with eval {} if ($@) {} constructs, is there any
hidden gotcha to grouping several statements in a single eval if I want
any errors handled identically? For instance, can I wrap an execute and
its fetches into one
[EMAIL PROTECTED] [EMAIL PROTECTED] wrote:
Howdy,
If I'm handling errors with
eval {} if ($@) {}
constructs, is there any hidden gotcha to grouping several statements in a
single eval if I want any errors handled identically? For instance, can I wrap
an execute and its fetches into one
On Mon, 15 Dec 2003 12:57:32 -0500 [EMAIL PROTECTED] wrote:
If I'm handling errors with eval {} if ($@) {} constructs, is there any
hidden gotcha to grouping several statements in a single eval if I want
any errors handled identically? For instance, can I wrap an execute
and its fetches into
On Mon, 15 Dec 2003, Hardy Merrill wrote:
Paul, you normally don't care about committing or rolling
back unless you're actually updating the database by doing
either an INSERT or an UPDATE. When you're just doing
SELECT and fetches you really don't care about transaction
processing. If you
On Fri, 6 Jun 2003 11:26:21 -0700 (PDT), steve hatfield wrote:
Hi all;
Hi Steve
I am running .sql scripts in Oracle using DBI. I was looking for
error handling when I run the different .sql's. The only thing I
found was $dbh-errstr();
and when u connect I understand that but is there anything
module.
Thanks,
Andrew
-Original Message-
From: Steve Haslam [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 20, 2003 12:31 PM
To: 'Hughes, Andrew'; '[EMAIL PROTECTED]'
Subject: RE: Error Handling
entered into the database. With this code, I recieve the Carp error in
the
browser
, January 21, 2003 9:30 AM
To: Hughes, Andrew
Cc: '[EMAIL PROTECTED]'
Subject: Re: Error Handling
Hughes, Andrew [[EMAIL PROTECTED]] wrote:
Thanks for all of the feedback. I realize that using the eval{} statement
is probably the way to go. However, as I am new to this, I don't quite
get
it yet
Hi,
Before doing the insert statement run a SELECT query from the table
specifying the e-mail address in the WHERE condition.
i.e. use something like:
my $sql = SELECT 1
FROM USERS
WHERE e-mail = $email;
my $sth = $dbh-prepare($sql);
$sth-execute();
my $val = $sth-fetchrow_array();
if
entered into the database. With this code, I recieve the Carp error in
the
browser. When I turn off Carp, the script acts as if the entry was added
(no error displayed), but the record is not entered. Can anyone offer
suggestions on how to make decisions based on a DBI error message ?
wrap
AM
To: Hughes, Andrew [EMAIL PROTECTED]
Subject: Re: Error Handling
Hi,
Before doing the insert statement run a SELECT query from the table
specifying the e-mail address in the WHERE condition.
i.e. use something like:
my $sql = SELECT 1
FROM USERS
WHERE e-mail = $email;
my $sth = $dbh
I have done this kind of thing, and I check the value of $DBI::errstr to see
if I could connect to the Database. After I do an insert I turn around and
do a select and check the return code to make sure the records were added.
I am sure there are other and better ways out there through.
Hi,
I want to write a program that acesses two databases,
fetching data from one, writing to the other. The core code
works fine now, but i have several thoughts left:
The program shall run as WinNT Service, running every 10
minutes or so. So the program may not die when it can't
-- arun arora [EMAIL PROTECTED]
Hi All,
I have seen some standard SybPerl programs that are using the
ct_callback(CS_CLIENTMSG_CB,msg_cb);
ct_callback(CS_SERVERMSG_CB,srv_cb);
for the error handling. This is i suppose the comcept of completion
callback
I
We need a little bit more code than this. What do you mean by $@ not being
understood? Are you using eval{}? Is you script failing within eval{}?
Are you setting RaiseError = 1 or using || die()?
Ilya Sterin
-Original Message-
From: Julio Santiago
To: [EMAIL PROTECTED]
Sent:
: Sterin, Ilya [EMAIL PROTECTED]
To: 'Julio Santiago ' [EMAIL PROTECTED], '[EMAIL PROTECTED] '
[EMAIL PROTECTED]
Subject: RE: Error Handling
Date: Mon, 7 May 2001 09:54:41 -0600
We need a little bit more code than this. What do you mean by $@ not being
understood? Are you using eval{}? Is you
-
From: Julio Santiago
To: Sterin, Ilya; [EMAIL PROTECTED]
Sent: 05/07/2001 10:14 AM
Subject: RE: Error Handling
Here is part of the code:
{
if ($operacion eq INGRESAR){
$SQL1=SELECT ID FROM OPERADORES WHERE ID=?;
$buscar_id_operador = $dbh-prepare($SQL1) || die Couldn't prepare
statement
19 matches
Mail list logo