Solved

TZConnection and TIBDatabase they do not want to work together

Posted on 2007-12-04
1
1,152 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 500 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Objective: - This article will help user in how to convert their numeric value become words. How to use 1. You can copy this code in your Unit as function 2. than you can perform your function by type this code The Code   (CODE) The Im…
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…
This is a video describing the growing solar energy use in Utah. This is a topic that greatly interests me and so I decided to produce a video about it.
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

930 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now