Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

TZConnection and TIBDatabase they do not want to work together

Posted on 2007-12-04
1
Medium Priority
?
1,163 Views
Last Modified: 2013-11-23
Hello Experts :-)

I use TZConnection and TIBDatabase on my TDataModule.

TZConnection is responsible for connection for all my Zeos components.
TIBDatabase is used only for one TIBEvents.

This is what I actually do:

    DMabc.ZConnectionMH.Database := PathToFile;
    DMabc.IBDatabase1.DatabaseName := PathToFile;

    try
      DMabc.ZConnectionMH.Connected := True;
      DMabc.IBDatabase1.Connected := True;
   except
   end;

It used to work fine before I had to re- install Delphi and WinXP.

Now I get such an error:

SQL Error: I/O error for file: "my database file" Error while trying to open file The process cannot access the file because it is being used by another process.

These are my components' properties:

object ZConnectionMH: TZConnection
  Protocol = 'firebird-1.5'
  Database = 'path to gdb file'
  User = 'sysdba'
  Password = 'masterkey'
  ReadOnly = True
  TransactIsolationLevel = tiReadCommitted
  Left = 36
  Top = 8
end

object IBDatabase1: TIBDatabase
  DatabaseName = 'path to gdb file'
  Params.Strings = (
    'user_name=sysdba'
    'password=masterkey')
  LoginPrompt = False
  IdleTimer = 0
  SQLDialect = 3
  TraceFlags = []
  Left = 33
  Top = 72
end

What do I do wrong?
Why it used to work and now doesnt?

Thank you very much :-)

panJames
0
Comment
Question by:panJames
1 Comment
 
LVL 21

Accepted Solution

by:
ziolko earned 1500 total points
ID: 20409793
looks like your TZConnection opens db file with exclusive lock, check if there's some property that controls locks

ziolko.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Loops Section Overview

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question