Re: Stored Procs + SQLWindows
Posted in 1998
--0__=lXJ2I9YA7Q4x1j5hLv1HNbUHnswaunWUcJFtwKkff9pAd2VbQbbPEgen
Content-type: text/plain; charset=us-ascii
Content-Disposition: inline
Perhaps I'm misreading you, but why not issue your
transactional/concurrency commands (begin work/set lock mode) within the
stored procedure?
Unless there are other actions being performed on the database from the
application?
e.g.
create procedure do_something() returning <result data type>
set lock mode to <whatever>
set isolation level to <whatever>
begin work;
<do commands>
if <successful> then
commit work;
else
rollback work;
end if
return <result>
end procedure
-mka
Michael Ackerbauer
SP System Test
<original message>
--0__=lXJ2I9YA7Q4x1j5hLv1HNbUHnswaunWUcJFtwKkff9pAd2VbQbbPEgen
Content-type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-transfer-encoding: quoted-printable
Does anybody have experience in Informix ODS 7.13 stored procedures tha=
t
are called from a client-programme (Gupta SQLWindows 5.0.4) via Inet?
The procedure deletes records and then inserts new records in the same
table. This should be possible for multiple users at the same time - so=
we set the lock mode to wait with commited read in the client
application before the stored procedure call is executed. After the cal=
l
is executed, the application calls a commit. Now the problem: A runtime=
error 'already in transaction' occurs when the application is run
including 'set lock mode' and 'begin work / commit work' statements in
the stored procedure. Running the application with 'commit work' in the=
stored proc leads to runtime error 'not in transaction'. Without
transaction handling at all in the stored proc, the lock mode and
transaction handling in the application seem to be ignored during the
stored proc execution: an isam-error comes up if several users run the
application and delete at the same time.
When running the stored procedure in DBACCESS including 'set lock mode'=
and 'begin work / commit work' statements everything works fine.
Any help is appreciated!
Angelika Draheim
CommerzLeasing und Immobilien GmbH
D=FCsseldorf
Germany
=
--0__=lXJ2I9YA7Q4x1j5hLv1HNbUHnswaunWUcJFtwKkff9pAd2VbQbbPEgen--