Using ADO, there is only one way to avoid locks.
These are the settings.
Server Side Cursors.
Cursor: OpenForwardOnly
Lock Type: ReadOnly.

Any other settings causes cursors to be used, which then gives your kind of
locking problem.

Don't know how to solve this for the BDE.

Suggest you seacrh MSD for "ADO lock types" This will explain why. 

Now all  you have todo is to figure our how to have these settings with the
BDE.

Myles.

> -----Original Message-----
> From: Gnad, Philip [SMTP:[EMAIL PROTECTED]]
> Sent: Tuesday, June 13, 2000 5:16 PM
> To:   Multiple recipients of list delphi
> Subject:      [DUG]:  Delphi 5 / SQL Server 7 Locking Problems
> 
> I've just upgraded a Delphi 3 / SQL Server 6.5 application to Delphi 5 /
> SQL
> Server 7 and have encountered locking problems with queries that prevent
> users from updating data that other users are viewing in a read-only
> datagrid (am using BDE).
> 
> The application used to work fine in the original versions.
> 
> Looking at the current activity SQL Server 7 Enterprise Manager, for each
> row of data retrieved in the read-only query (some of which are displayed
> in
> a TDBGrid) there are various page and key shared locks on the tables used
> in
> the query join. These locks do not disappear until another query is run
> which is connected to the same database component. While the first user
> has
> run the query and is viewing the data, the second user cannot update data
> rows that hae been retreived from the read-only query.
> 
> The database component has TransIsolation Level of tiReadCommitted, which
> according to the Delphi documentation should release the locks as soon as
> the query is executed, and not hold onto them.
> 
> I'm probably missing something obvious here. Any help gratefully accepted.
> 
> 
> --------------------------------------------------------------------------
> -
>     New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
>                   Website: http://www.delphi.org.nz
---------------------------------------------------------------------------
    New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
                  Website: http://www.delphi.org.nz

Reply via email to