Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

TZConnection and TIBDatabase they do not want to work together

Posted on 2007-12-04
1
Medium Priority
?
1,160 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

722 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