Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Sybase transaction processing and SQR

1 view
Skip to first unread message

Julie Lawton

unread,
Feb 9, 2000, 3:00:00 AM2/9/00
to
Hi,

Hope you can help!!

I have an SQR script which first runs a begin-select paragraph followed by
an update (within a begin-sql para). The problem I have is that these two
run as separate Sybase transactions. This gives me a situation where the
records are selected and then a new record could be added and then the
records are updated (including the new record) but the new record has not
been selected.

Initially I thought that I could start the procedure with a 'begin
transaction' (within a begin-sql para) and end the procedure with a 'commit
transaction'. When I did this and ran the script, it was hanging on the
select.

Now I have changed it. I have removed the 'begin tran' and 'commit tran'.
I have changed the update to be its own procedure. In the begin-select, I
have put a 'do update' command in before the 'from table where' parameters.

My questions are:

1. Does this now constitute one Sybase transaction? The begin-select calls
the update. Is is possible for another transaction to be done between the
two?

2. Any reasons why the 'begin tran' and 'commit tran' did not work?

Many thanks

Julie (lawton...@hotmail.com)

0 new messages