Delphi 2010 + TIBDatabase + connection error (how to catch error) [Edit]

Hi All 

Could someone help me in this case:
{code}
Try
 DataBase.Connect:=True;
Except
 on >databaseconnectionerror< do
   ShowMessage('DataBase connection faild);
end;
{code}
I do not know, how to catch (handling) IB errors in my Delphi application.

Thank You very much in advance

Best Regards

Jacek

Edited by: Jacek Fągowski on Aug 14, 2012 9:04 AM
0
Utf
8/14/2012 4:05:04 PM
embarcadero.delphi.interbase 331 articles. 1 followers. Follow

2 Replies
821 Views

Similar Articles

[PageSpeed] 31

Jacek Fągowski wrote:
> Hi All 
> 
> Could someone help me in this case:
> {code}
> Try
>  DataBase.Connect:=True;
> Except
>  on >databaseconnectionerror< do
>    ShowMessage('DataBase connection faild);
> end;
> {code}
> I do not know, how to catch (handling) IB errors in my Delphi application.
> 
> Thank You very much in advance
> 
> Best Regards
> 
> Jacek
> 
> Edited by: Jacek Fągowski on Aug 14, 2012 9:04 AM

IBX throws exceptions of type EIBError (or a descendant there of).  This 
exception type introduced the SQLError code and the IBErrorCode that relate back 
to the IBError file.  Mainly you'd just want to get at the message like a normal 
Exception has.

-- 
Jeff Overcash (TeamB)
       (Please do not email me directly unless  asked. Thank You)
And so I patrol in the valley of the shadow of the tricolor
I must fear evil. For I am but mortal and mortals can only die.
Asking questions, pleading answers from the nameless
faceless watchers that stalk the carpeted  corridors of Whitehall.
              (Fish)
0
Jeff
8/14/2012 6:01:39 PM
> {quote:title=Jeff Overcash wrote:}{quote}
> Jacek Fągowski wrote:
> > Hi All 
> > 
> > Could someone help me in this case:
> > {code}
> > Try
> >  DataBase.Connect:=True;
> > Except
> >  on >databaseconnectionerror< do
> >    ShowMessage('DataBase connection faild);
> > end;
> > {code}
> > I do not know, how to catch (handling) IB errors in my Delphi application.
> > 
> > Thank You very much in advance
> > 
> > Best Regards
> > 
> > Jacek
> > 
> > Edited by: Jacek Fągowski on Aug 14, 2012 9:04 AM
> 
> IBX throws exceptions of type EIBError (or a descendant there of).  This 
> exception type introduced the SQLError code and the IBErrorCode that relate back 
> to the IBError file.  Mainly you'd just want to get at the message like a normal 
> Exception has.
> 
> -- 
> Jeff Overcash (TeamB)
>        (Please do not email me directly unless  asked. Thank You)
> And so I patrol in the valley of the shadow of the tricolor
> I must fear evil. For I am but mortal and mortals can only die.
> Asking questions, pleading answers from the nameless
> faceless watchers that stalk the carpeted  corridors of Whitehall.
>               (Fish)

Thank You very much - it works perfect. 

No it's clear. 

Regards
Jacek
0
Utf
8/14/2012 8:36:06 PM
Reply:

Similar Artilces:

Delphi XE HTTP: error "Socket Error #10054 Connection reset by peer" [Edit]
Communication type is set to HTTP, LifeCycle is set to Invocation. Invocation represents a stateless connection, but when the network connection drops, the client throws the error "Socket Error #10054 Connection reset by peer". Are there any other properties to set up apart from LifeCycle? Hi Irina, > Communication type is set to HTTP, LifeCycle is set to Invocation. > > Invocation represents a stateless connection, but when the network connection drops, the client throws the error "Socket Error #10054 Connection reset by peer". Are there any other proper...

[connect error] Interbase Connect Error
In ODBC connect test is successfully.. but in PowerBuilder 6.5 Database Profiles is displayed error message.. Error Message is SQLSTATE = 40001 [Easysoft][Interbase]Dynamic SQL Error, SQL error code = -91, feature is not supported What means this message? Now I use PowerBuilder 6.5 & Interbase 5.6... Just I choose - Profile Name - Data Source --> This is ODBC DNS..(user DNS) - User ID - Password Does it need more? ...

coreide140.bpl error in delphi 2010 [Edit]
Version Info: Delphi and C++ Builder 2010 Updt 4 Rad Studio 2010 Help Updt 3 Delphi and C++ Builder 2010 Updt 5 (Database5) Jedi 2.4.5.0 Making changes to a proj, run, build raises this exception. Also get the rtl140.bpl error after this. Have chkd Lib path for invalid paths. Have a JVCL error too, which is not consistent. ---------------- Details of coreide error ---------------- [2082DE14]{coreide140.bpl} EdTrackr.TEdTracker.AddPos (Line 161, "EdTrackr.pas" + 26) + $6 [22204A41]{dotnetcoreide140.bpl} MSBuildInterop.TMSBuildProjectInterop.Build (Line 112, &...

Delphi 2010 + InterBase Express + DBMemo (error)
Hi * I have a table in database (firebird 2.5 - UTF8 ) which conteins several fields: numeric, varchar, BLOB (subtype 1 - text). When I put on my form standard component TDBmemo and link to DataSource (to BLOB field), my applicatin after calling SelectSQL crushes - Access violation - Read access 000000EC. The same problem is when I use Memo components. When I remove this control (DBMemo) - application works fine without any problems. The question is: How to display BLOB (text) field in DBMemo or Memo control? Thank You very much in advance Regards Jacek Fągowski P.S...

Error, Error and more errors
Okay, all I wanted to do was test this app out and it has been a nightmare. 1.) Didn't install the sql database. I had to manually install it. 2.) I get errors when trying to add a picture to an album. "Procedure or function ngUpdatePicture has too many arguments specified" Any ideas? I've gotten more errors than this, but there is no use in bitchin. Are you using the v1.6.1 installer? Also, did you select to install the SQL Server db and give it a valid admin login? What were some of the error messages? Did you have an existing DB from a previous install? ...

error error error
These are the 2 new errors i am getting now:   1).  Server Error in '/' Application. Configuration Error Description: An error occurred during the processing of a configuration file required to service this request. Please review the specific error details below and modify your configuration file appropriately. Parser Error Message: It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level. This error can be caused by a virtual directory not being configured as an application in IIS.Source Error: Line 53: ...

errors errors errors..
Name: harun Email: harunbjk1903hrnatgmaildotcom Product: Firefox Summary: errors errors errors.. Comments: first of all when i launch firefox (3) i cant enter websites via writing.. for example when I type "google" and then press ctrl and enter, it crashes.. and i take lots of error reports. firefox 2 was better.. see you again , harun Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; tr; rv:1.9) Gecko/2008052906 Firefox/3.0 From URL: http://hendrix.mozilla.org/ ...

Delphi 2010: [DCC Fatal Error] F2084 Internal Error: AV00000000-R00000000-0
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. --JivePart=_44d84.zeB8CwDOH5aMJzMl Content-Type: text/plain; charset="Utf-8" Checking project dependencies... Compiling Multicast.dproj (Debug configuration) [DCC Fatal Error] Multicast.dpr(152): F2084 Internal Error: AV00000000-R00000000-0 Failed Elapsed time: 00:00:00.2 --JivePart=_44d84.zeB8CwDOH5aMJzMl Content-Type: text/plain; name="Multicast.dpr" Content-Transfer-Encoding: base64 Content-Disposition: attachment; ...

Delphi 2010: [DCC Fatal Error] F2084 Internal Error: AV00000000-R00000000-0
I'm trying to compile the following code but the compiler gives me an internal error message. This is my second experiment with generics and it is complete failure. Do they work at all? I'm very disappointed. Checking project dependencies... Compiling Multicast.dproj (Debug configuration) [DCC Fatal Error] Multicast.dpr(152): F2084 Internal Error: AV00000000-R00000000-0 Failed Elapsed time: 00:00:00.2 I have posted the project (a simple console application) to the attachments group. Can anybody compile this code in their Delphi XE IDE? program Multicast; {$APPT...

[Ask]How to Fix Error Compile Tpmath in delphi 2010 [Edit]
Hello There,,, Is there anything that can help me in resolving tpmath compile error in my program ...??? Messages that appear on my program as follows: "[DCC Fatal Error] Tambahan.pas (4): F2063 Could not compile used unit '.. \ .. \ .. \ .. \ tpmath \ etc \ tpmath.pas'"..... I included a picture..... [http://tinypic.com/view.php?pic=25ib47d&s=5#.UkHq4tKl5-F] Thanks in advanced Edited by: Sahmanbanta Sinulingga on Sep 25, 2013 3:44 AM ...

Registration Error Installing Delphi 2010 on VMware 7 [Edit]
After installing D2010 on VMware Workstation 7.0.0 (not logged into domain, no internet connection) running Windows 7 32bit (latest updates), the message "Unable to register Embarcadero Delphi 2010: bdsreg.exe is invalid." immediately comes up. Tried with the original ISO connected to the VM and extracting the setup files onto the VM. If I then install update 4, the Delphi shortcut then takes me to the "tamper" web page. Does anyone have any information on this problem? Can't see why this setup shouldn't be allowed. Will now try with a fresh VM and install ...

Delphi 2010 / IdHTTP problem: Socket Error # 0 [Edit]
I have code that uses IdHTTP to do a HTTP Post to an HTTPS URL. I set my IdHTTP1.IOHandler to the object returned from TIdSSLIOHandlerSocketOpenSSL.Create(). After calling IdHTTP1.Post(posturl, slPostData), with slPostData being a TStringList.Create(); I get this exception: *Project OUTLOOK.EXE raised exception class EIdSocketError with message 'Socket Error # 0'.* I know for sure that the problem is not in my code, because I exported an earlier version of my source code that I know works for sure, compiled it with Delphi 2010, and I got the same problem. The same code works if ...

Help installing .pas component in delphi 2010.... addressing error message [Edit]
I downloaded this component... http://www.torry.net/vcl/system/shell/shcmdint.zip ----------------------------------------------------------------------------------------------------------------------------------------- Components > System > Shell TShellCommand Interface v.1.02 FWS 57 Kb 10 Jul 2000 By Ken Miles. A component that allows applications to interact with the Windows Explorer, open documents in an existing (single) instance of the application and respond to right mouse menu items for file types in the Windows Explorer. It can simply process the command line parame...

Error on Delphi 6 but not on Delphi Xe for Ftp
I am Experimenting with get a file from our webside server via Ftp. I have 2 Machines 1 a laptop runing XP Delphi 6 Indy 10.5.8.0 An a machine runing Window 7 Delphi XE2 with Indy 10.5.8.0. I am using the Same Code on Both. procedure TFrmMain.ProcessItemDalySpecial; var PathDest : String; FileName : String; begin with FrmTb2 do begin if ReadIniBoolean(IniCfg,'FTP','UseFtpDaly') then begin Ftp.Host := ReadIniStr(IniCfg,'FTP','HostDaly'); Ftp.Port := ReadIniInt(IniCfg,'FTP'...

Web resources about - Delphi 2010 + TIBDatabase + connection error (how to catch error) [Edit] - embarcadero.delphi.interbase

Resources last updated: 11/25/2015 1:08:51 PM