Start read only transactions not work

Discussion of open issues, suggestions and bugs regarding IBDAC (InterBase Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
Posts: 7
Joined: Mon 27 Jul 2020 18:11

Start read only transactions not work

Post by delphiman » Thu 13 Jan 2022 12:48

Hello, I'm performing some tests where I need to perform a query in the database in read-only mode, that is, I want to start a read-only transaction, consult the data and close this transaction.

I did several tests configuring transaction isolation, but I may be doing something wrong as it is not querying with the isolation I request.

Can you give me a correct example of how to use it?


Code: Select all

IBCConnection1.DefaultTransaction.IsolationLevel := iblReadOnlyReadCommitted;
IBCQuery1.SQL.Text := 'select * from test';


Best Regarts;

Devart Team
Posts: 5
Joined: Thu 06 Jan 2022 14:16

Re: Start read only transactions not work

Post by pavelpd » Fri 14 Jan 2022 15:49

Hi there!

Thank you for your question!

We checked the work of the code fragment you have sent and found no issues.
Your code does not contain any data modification operations, so it runs without any errors or warnings. In case of execution of any request to change the data, you will receive a message "attempted update during read-only transaction".
Please, explain what is incorrect in such behavior from your point of view?

Post Reply