🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.delphi.database
Article #251

BDE Error Handling

#251
From: Chris Arets
Date: Tue, 16 Jul 2002 14:02
39 lines
1882 bytes
Hi there !!

We are implementing a multi-user system with Delphi 6 (BDE) and
Interbase 6.5. We are using normal queries and stored procedures. We
use database-transactions to implement our multi-user system. The
system itself works fine, but we can't separate the different BDE
error codes. We always get a "General SQL error" (BDE code 13059). But
we want to handle the errors seperate, such as BDE error 10259 (Record
changed by another user) or 10260 (Record was deleted by another
user).

After we start the transaction, we tried the delphi (pseudo) code
below:

Try
  //Execute the query or stored procedures
  Database.Commit
Except
  on E:EDBEngineError do
  begin
    for i:=0 to ErrorCount - 1 do
    begin
      ShowMessage(IntToStr(Errors[i].ErrorCode))
      //this is always 13059, while we want it to be
        10259 or 10260 depending on the user interaction
      Database.Rollback
    end  
  end
End

Our BDE configuration is this:

SQLQryMode : Server
Wait on lock : False
SQLPassthruMode : Not Shared

Thanks in advance !!

Greets Chris
Technical Details
Message-ID: <10c07c02.0207160602.72e10a67@posting.google.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 115d96,2d008ce6d31b8b7,start
X-Google-Attributes: gid115d96,public
X-Google-ArrivalTime: 2002-07-16 07:02:54 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!postnews1.google.com!not-for-mail
From: chris.arets@hetnet.nl (Chris Arets)
Newsgroups: borland.public.delphi.database
Subject: BDE Error Handling
Date: 16 Jul 2002 07:02:53 -0700
Organization: http://groups.google.com/
Lines: 39
Message-ID: <10c07c02.0207160602.72e10a67@posting.google.com>
NNTP-Posting-Host: 195.241.164.54
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
X-Trace: posting.google.com 1026828173 1053 127.0.0.1 (16 Jul 2002 14:02:53 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: 16 Jul 2002 14:02:53 GMT