Solved

TZConnection and TIBDatabase they do not want to work together

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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

Suggested Solutions

Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
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 Micro Tutorial hows how you can integrate  Mac OSX to a Windows Active Directory Domain. Apple has made it easy to allow users to bind their macs to a windows domain with relative ease. The following video show how to bind OSX Mavericks to …
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

785 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