Subject Re: [ib-support] Deadlocks
Author Brad Pepers
> Well, just that if you had read the Language Ref, you would realise that
> it's part of IB's (and many other databases') SQL language; and that
> isolation levels are not a feature of ODBC drivers but of databases; and
> that IB's isolation levels and lock resolution settings are discussed in
> the entry for SET TRANSACTION.

But its all based on the isc_start_transaction call so I thought reading that
section of the manual should cover it. Not unreasonable I think but in this
case, not true...

> >I don't think so...??? I'm using the isc_dsql routines which you could of
> >course use to create an ODBC driver
>
> or Delphi components
> or various utility programs
> or whatever you need to use the API function calls for...
>
> I didn't take your question to be about programming, that's all. You
> seemed to be asking about how to find out about the locking strategy. I
> was trying to tell you where to find out about it...it didn't even occur to
> me that you were attempting to write a db application using only direct
> function calls.

I tried to always be very specific of exactly which API function call I was
using and to say I was using the low level API so I'm not sure where the
confusion came in. I guess its because there are two parts to my problem:

1. Using the isc_dsql_* API level, how do I get the code working the way I
need without causing the deadlock errors?

2. Why doesn't the second transaction wait on the lock instead of returning
an error?

The first is a specific programming question and the second is just trying to
understand Interbase locking. The document you sent me to on the
multi-generational method Interbase uses was very good and from everything
else I've read, the second transaction should just wait on the first. But it
doesn't and I don't know why!

The reason I'm using direct function calls is that I have a C++ class layer
that is very much like JDBC and I use that for database access. It
dynamically loads drivers and I have ones written for other databases like
Sybase. In the case of Interbase, the best layer for writing such a driver
is the direct function level.

--
Brad Pepers
brad@...