|
|
sybperl-l Archive
Up Prev Next
From: bruno dot monteiro at sybase dot pt
Subject: No Subject
Date: Aug 19 2002 3:42PM
Good afternoon.
I'm having problems with locks when executing an SQL command with SybPerl.
For instance, if I have a piece of script like the one bellow, I always get
locks in tables A and B, even when declaring the noholdlock option:
$dbh = Sybase::DBlib->dblogin($user,$passwd,$SERVER);
@rows=$dbh->sql("select a.M from A a noholdlock, B b noholdlock where
a.id=b.id",undef,TRUE);
$dbh->dbsqlexec;
$dbh->dbclose;
Like this it's impossible to make any kind of changes to the table while the
connection is open. For example it be impossible to change the value of the
column a from the table A using something like:
while ($dbh->dbresults != NO_MORE_RESULTS) {
# execute a Stored Procedure that update the column a with a new value
...
}
Is there any way to avoid this problem?
Thanks,
Bruno
|