Delphi BDE TQuery Problem

pro999
pro999 used Ask the Experts™
on
Hi,

  I'm using a T_Query object to update a Oracle Database.
I have 1 Tdatabase object and 1 TQuery object to update some records. The problem is that the program (running as a windows 2000 service) 'freeze' after doing the ExecSql query. My database is updated correctly but the service hang by calling ExecSQL function. If i try to stop the service from Windows 2000 services windows,i got a Error 1067, the process terminated unexpectedly. (The except block is never used :( ) Help me please!!

Pascal

Delphi code below :
-------------------
try

   if FDBOracleStatut = TRUE then
    begin
      ServiceCourrierOracle.G_Update.SQL.Clear;
      ServiceCourrierOracle.G_Update.SQL.Add('update electronic_mail_oracle set STATUTE = ''ERROR'' where SEQUENCE_MAIL = '+IntToStr(NumCourrier));
      ServiceCourrierOracle.G_Update.ExecSQL;

    end;

   except
    on E: Exception do
    begin
      LogEvent('DBA-0007 Impossible de modifier l''état de l''enregistrement dont le numéro de séquence est '+InTToStr(NumCourrier)+' de la table de courrier électronique. (TNS Name: '+ FConnexCourante +', Propriétaire: '+FUsagerCourant+') '+' Message Oracle :'+E.Message);
      ServiceCourrierOracle.LogMessage('DBA-0007 Impossible de modifier l''état de l''enregistrement dont le numéro de séquence est '+InTToStr(NumCourrier)+' de la table de courrier électronique. (TNS Name: '+ FConnexCourante +', Propriétaire: '+FUsagerCourant+') '+' Message Oracle :'+E.Message);
      Close;
    end;
  end;

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

Author

Commented:
I try the same code on another server and it works. The configuration for BDEAdmin is the same for both servers.
The problem is probaly related with SQL drivers for Oracle...
Commented:
pro999,

If, as you suspect, the problem is with your SQL Link drivers, you can verify this by reviewing the versions of these DLL's from each PC.

To do this:

1.  Start the BDE Administrator from Control Panel.
2.  Make the Configuration tab active by clicking it.
3.  From the menu, choose Object | Version information.

This shows you the VERSIONINFO structure from each DLL.  

The main Oracle SQL link DLL's are SQLORA32.DLL (Oracle 7) and SQLORA8.DLL (Oracle 8).

If you're using need to update these DLL's, I recommend downloading the appropriate update from http://info.borland.com/devsupport/bde/bdeupdate.html.  Note that there is an updated set of Oracle DLL's for Oracle 8 and BDE 5.1.1 (located father down on the page).

Now, you might also have to review the configuration of the aliases defined on each machine.  It may be useful to copy the BDE32.CFG from the machine that works to the one that doesn't and trying again.  (After keeping a copy of the one you're replacing, of course.)

Hope this helps...

-- Lance

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial