Solved

TZConnection and TIBDatabase they do not want to work together

Posted on 2007-12-04
1
1,151 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
Comment Utility
looks like your TZConnection opens db file with exclusive lock, check if there's some property that controls locks

ziolko.
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

772 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

12 Experts available now in Live!

Get 1:1 Help Now