Hello,
I wrote some windows services to make some database-operations in the background.
They are working fine with SQL-Server and Oracle. But when I try to start them on a (local) InterBase-System: TUniConnection.Connect doesn't works. Sometimes I see in DBMonitor "Error" without an error-description, sometimes DBMonitor shows "pending".
After many, many tries I have no idea what I can do. Is there any command I have to use in InterBase? Something like "CoInitialize" on SQL Server?
I use Delphi 7 with UniDAC 3.50.0.13, Interbase XE, Oracle 8.0.5 and Sql Server 2008 RC2.
Thanks in advance for any help.
Kind regards,
Gerd Brinkmann
invent GmbH
Need some help with InterBase and windows services
Re: Need some help with InterBase and windows services
Hello,
please answer. There must be a way to make Windows services with UniDAC and InterBase.
Kind regards,
Gerd Brinkmann
invent GmbH
please answer. There must be a way to make Windows services with UniDAC and InterBase.
Kind regards,
Gerd Brinkmann
invent GmbH
Re: Need some help with InterBase and windows services
Unfortunately, we cannot reproduce the problem.
There are no additional commands needed to use UniDAC with the InterBase provider in the Windows service.
We created a simple Windows service application using the File->New->Service Application wizard, added the TUniConnection component with the InterBase provider and the TUniQuery component to the service's datamodule, and placed the code for establishing a connection to the database and executing a SQL-statement in the service's OnExecute event handler.
We used Delphi 7 with UniDAC 3.50.0.13 and InterBase XE (WI-V10.0.3.566) in our test. Operating system - Windows 7.
The test has been performed without any errors.
So, please try to find the error cause using the following approaches:
- try to inspect the Windows Event Viewer log in order to find any error messages concerning the service;
- try to implement the custom service log and then wrap all the "potential dangerous" methods (like UniConnection.Connect) into try...except blocks in order to log exception messages.
Also, please specify the exact version of InterBase XE you are using. You can learn it from the Info sheet of TUniConnection Editor when TUniConnection is connected.
There are no additional commands needed to use UniDAC with the InterBase provider in the Windows service.
We created a simple Windows service application using the File->New->Service Application wizard, added the TUniConnection component with the InterBase provider and the TUniQuery component to the service's datamodule, and placed the code for establishing a connection to the database and executing a SQL-statement in the service's OnExecute event handler.
We used Delphi 7 with UniDAC 3.50.0.13 and InterBase XE (WI-V10.0.3.566) in our test. Operating system - Windows 7.
The test has been performed without any errors.
So, please try to find the error cause using the following approaches:
- try to inspect the Windows Event Viewer log in order to find any error messages concerning the service;
- try to implement the custom service log and then wrap all the "potential dangerous" methods (like UniConnection.Connect) into try...except blocks in order to log exception messages.
Also, please specify the exact version of InterBase XE you are using. You can learn it from the Info sheet of TUniConnection Editor when TUniConnection is connected.
Re: Need some help with InterBase and windows services
Hello,
thanks for this information. I will try this, but it will take some days...
Kind regards,
Gerd Brinkmann
invent GmbH
thanks for this information. I will try this, but it will take some days...
Kind regards,
Gerd Brinkmann
invent GmbH