Interface Errors in D5

Hi,
The collection TAdoConnection.Errors seems very promising but I don't find 
indications what is the state-of-art way to use it.

1. In ADO Vcl objects I don't see any OnError event. So, it seems that it's 
not the designed way to exploit Errors.

2. I had a supposition that, may be, whenever Errors are affected with a 
potentially interesting provider's info, an exception is raised and I am 
given an the opportunity to consult Errors in an exception block. But 
looking through the VCL code I didn't find anything corroborating with tis 
idea.

Any hint will be very appreciated.
0
Jacek
1/29/2009 11:10:47 AM
embarcadero.delphi.ado 597 articles. 1 followers. Follow

3 Replies
437 Views

Similar Articles

[PageSpeed] 20

when your components generate and error you can look at the TadoConnectoin.errors collection and pull out additional information about the error.

Here is basically how you would itterate through the Errors (there could be more than one although I have not found that to occur in my use)
and the information you can get out of it.

  For i:=0 To ADOConnection.Errors.Count-1 Do Begin
   
    ADOConnection.Errors[i].Source;
    ADOConnection.Errors[i].Description ;
    ADOConnection.Errors[i].SQLState;
   ADOConnection.Errors[i].number;
   ADOConnection.Errors[i].nativeError;

    End;




> The collection TAdoConnection.Errors seems very promising but I don't find 
> indications what is the state-of-art way to use it.
> 
> 1. In ADO Vcl objects I don't see any OnError event. So, it seems that it's 
> not the designed way to exploit Errors.
> 
> 2. I had a supposition that, may be, whenever Errors are affected with a 
> potentially interesting provider's info, an exception is raised and I am 
> given an the opportunity to consult Errors in an exception block. But 
> looking through the VCL code I didn't find anything corroborating with tis 
> idea.
> 
> Any hint will be very appreciated.
0
Brian
1/30/2009 1:13:44 AM
Thank you Brian,
It seems similar to my supposition 2.
1. Should I understand your
        "when your components generate and error"
   as "when call of your components members raises exception" ?

2. According to your experience, the exceptions raised by ADO components do 
they appear in the application code as all of class EAdoError ?

3. While reading the MSDN library doc, I understood (?) that Errors are 
affected only by the connection provider, cf. 
http://msdn.microsoft.com/en-us/library/ms675867(VS.85).aspx.
OTOH, it seems that there may be other errors issued by ADO itself. Does ADO 
clears TAdoConnection.Errors before raising its proper (i.e. not 
provider-related) exception ?

Thank you in advance.


<Brian Bushay> wrote in message news:74440@forums.codegear.com...
> when your components generate and error you can look at the 
> TadoConnectoin.errors collection and pull out additional information about 
> the error.
>
> Here is basically how you would itterate through the Errors (there could 
> be more than one although I have not found that to occur in my use)
> and the information you can get out of it.
>
>  For i:=0 To ADOConnection.Errors.Count-1 Do Begin
>
>    ADOConnection.Errors[i].Source;
>    ADOConnection.Errors[i].Description ;
>    ADOConnection.Errors[i].SQLState;
>   ADOConnection.Errors[i].number;
>   ADOConnection.Errors[i].nativeError;
>
>    End;
>
>
>
>
>> The collection TAdoConnection.Errors seems very promising but I don't 
>> find
>> indications what is the state-of-art way to use it.
>>
>> 1. In ADO Vcl objects I don't see any OnError event. So, it seems that 
>> it's
>> not the designed way to exploit Errors.
>>
>> 2. I had a supposition that, may be, whenever Errors are affected with a
>> potentially interesting provider's info, an exception is raised and I am
>> given an the opportunity to consult Errors in an exception block. But
>> looking through the VCL code I didn't find anything corroborating with 
>> tis
>> idea.
>>
>> Any hint will be very appreciated.
0
Jacek
1/30/2009 7:35:32 AM
> It seems similar to my supposition 2.
> 1. Should I understand your
>         "when your components generate and error"
>    as "when call of your components members raises exception" ?
yes
> 
> 2. According to your experience, the exceptions raised by ADO components do 
> they appear in the application code as all of class EAdoError ?
No as EOleException

> 
> 3. While reading the MSDN library doc, I understood (?) that Errors are 
> affected only by the connection provider, cf. 
> http://msdn.microsoft.com/en-us/library/ms675867(VS.85).aspx.
> OTOH, it seems that there may be other errors issued by ADO itself. Does ADO 
> clears TAdoConnection.Errors before raising its proper (i.e. not 
> provider-related) exception ?
TadoConnection.Errors is cleared by the next Ado command

> 
> Thank you in advance.
> 
> 
> <Brian Bushay> wrote in message news:74440@forums.codegear.com...
> > when your components generate and error you can look at the 
> > TadoConnectoin.errors collection and pull out additional information about 
> > the error.
> >
> > Here is basically how you would itterate through the Errors (there could 
> > be more than one although I have not found that to occur in my use)
> > and the information you can get out of it.
> >
> >  For i:=0 To ADOConnection.Errors.Count-1 Do Begin
> >
> >    ADOConnection.Errors[i].Source;
> >    ADOConnection.Errors[i].Description ;
> >    ADOConnection.Errors[i].SQLState;
> >   ADOConnection.Errors[i].number;
> >   ADOConnection.Errors[i].nativeError;
> >
> >    End;
> >
> >
> >
> >
> >> The collection TAdoConnection.Errors seems very promising but I don't 
> >> find
> >> indications what is the state-of-art way to use it.
> >>
> >> 1. In ADO Vcl objects I don't see any OnError event. So, it seems that 
> >> it's
> >> not the designed way to exploit Errors.
> >>
> >> 2. I had a supposition that, may be, whenever Errors are affected with a
> >> potentially interesting provider's info, an exception is raised and I am
> >> given an the opportunity to consult Errors in an exception block. But
> >> looking through the VCL code I didn't find anything corroborating with 
> >> tis
> >> idea.
> >>
> >> Any hint will be very appreciated.
0
Brian
1/31/2009 12:56:33 AM
Reply:

Similar Artilces:

Convert Delphi 5 ADO App to Delphi 2007 ADO.NET
I have an appliction tha that is writen in Delphi 5 with ADOConnetion, ADOTable, and ADOQuery components. I need to upgrade to Delphi 2007 and use ADO.NET. I have the program building in with Delphi 2007. Is there anything I need to do to convert the ADO to ADO.NET? > I need to upgrade to Delphi 2007 and use ADO.NET. Why ? -- With best regards, Dmitry Arefiev AnyDAC (www.anydac.com) - Oracle, MS SQL Server, IBM DB2, MySQL, Firebird, Interbase, PostgreSQL, Sybase ASA, SQLite, MS Access, DBX, ODBC, InMem - universal high-speed native data access engine Reasons for ...

Delphi XE + TClientDataSet + ADO error
Hi, I have the error reported in this QC article: http://qc.embarcadero.com/wc/qcmain.aspx?d=88928 Anybody knows how to fix it ? Regards ...

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/ ...

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? ...

For -Beginners multiuser interface in delphi + ADO + Access
Hello! I have Delphi, and 3 ADO components (ADOConnection, ADOQuery, DataSource) and Quantium Grid from Devexpress (or standard DbGrid - it is not important). I put the Access DATAbase file in a shared folder, made the components connection with each other, as shown in many examples for beginners in ADO and started working. Additionally I write a code to add and to remove records using standard ADOQuery methods. Not yet been realized multiuser interface - everything worked well. But now it needs to be done an d I can not figure out how to approach this problem? Read many articles about ...

(provider: SQL Network Interfaces, error: 26
Hello all,  I have developed the project using .net 2008 with oracle database. In my visual studio its working fine.  Once i upload in to the server,I face the problem. when i am login in to the login.aspx page and the redirect into another page. in that i receive the error from Application_Error Event in Global.aspx page. Error Message:An error has occurred while establishing a connection to the server.  When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: SQL N...

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'...

Delphi 6 to Delphi 2010 upgrade and ADO
We have an application written in Delphi 6 Professional that uses ADO to access databases servers that may be on other PCs in our network. We want to move to Delphi 2010 but can't decide if we need Professional or Enterprise. 2010 Pro has dbGO - will this give us the same functionality as the ADO components we use in Delphi 6 Pro? Thanks, Keith > 2010 Pro has dbGO - will this give us the same functionality as the > ADO components we use in Delphi 6 Pro? Yes. > {quote:title=Joachim Uersfeld wrote:}{quote} > > 2010 Pro has dbGO - will this give us the same func...

SQL Network Interfaces, error: 26
This is the first time I'm trying to use a sql2005 express database thats notpart of a sql server. I'm just sticking the database in the app_datafolder. And i am getting the following error:An error has occurred while establishing a connection to the server.When connecting to SQL Server 2005, this failure may be caused by thefact that under the default settings SQL Server does not allow remoteconnections. (provider: SQL Network Interfaces, error: 26 - ErrorLocating Server/Instance Specified)The page i am trying to load shouldn't (yet) be attempting to write tothe database, just r...

ASA7 ADO & Delphi ADO ?? Anyone is using it?
Any comments? Is it working? Any Problems? Thanks Hi, PR <noemail@no.com> schrieb in im Newsbeitrag: BoTThJaq$GA.89@forums.sybase.com... > Any comments? Is it working? Any Problems? I tried to connect to ASA7 via the new OLE DB - Provider and ADOExpress from Delphi 5.01. No chance. Only the error message 'Invalid Enum Value'. About the new provider I haven't heard anything good until now... Regards Frank Frank, I've experienced the same problem with the ASA 7 OLEDB Provider. I'm not sure if this is a bug in the AsaProvider or Delp...

Error error error, help me
Hello, How do I populate a drop down list in asp.net from a database? I have a block of vbscript code that does the server side coding for it. My code is as follows.. <script language="vb" runat="server"> Dim objConn As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:\data\employee.mdb;") Dim Sql, valEmp As String Dim objDREmp as OleDbDataReader Sub FillEmployeeName(sender As Object, e As System.EventArgs) Sql = "select * from [Employee]" Dim objCommand As Ole...

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 Jacek Fągowski wrote: > Hi All > > Could someone help me in this case: > {code} > Try > DataBase.Connect:=True; > Except > on >databaseconnectionerror< do > ShowMes...

Error message Jaguar CTS Error Cannot Obtain Interface List for
PowerJ and Jaguar 3.6 I have a work space with 3 Entity Bean Targets. Deployed in a single JAR I had no trouble deploying the first 2 Beans but on the third I get the following message Error message Jaguar CTS Error Cannot Obtain Interface List for (target name) This message occurs during execution of the Client Interface for Jaguar CTS Component. I assume something is wrong with the deployment descriptor but am not sure how to go about fixing it. Any help would be appreciated. Ken Bedient SITA If know one has any suggestions on how to fix the problem how to ...

Web resources about - Interface Errors in D5 - embarcadero.delphi.ado

Interface - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

iOS 9 How-To: Use the updated multitasking interface on iPhone and iPad
Ever since Apple made the move to a more ‘flat’ design with iOS 7 , the multitasking interface has changed in either a minor or major way with ...

Google streamlining Hangouts on the web with interface tweaks, higher quality video
Google has announced some updates coming to Hangouts video calls on the web, including a tweaked interface, along with faster, crisper full-screen ...

Dictionary.com Dictionary & Thesaurus goes 7.0 with interface improvements
... especially for longtime users of the app like me. Fortunately, here comes version 7.0 of the app to the rescue with a handful of welcome interface ...

Firefox 43 adds new block list, updates Android user interface
Mozilla has rolled out Firefox 43 FINAL for Windows, Mac and Linux, with Firefox 43 for Android due to follow imminently. The desktop build ...

In pictures: iOS 9 vs. Android 6.0 Marshmallow user interfaces
Apple and Google already have hundreds of millions users for their mobile operating systems. Hardcore fans of each mobile platform seem to be ...

Google Updates Search Interface For Tablets
It looks like Google updated the search interface for tablets and switched to the mobile UI. The previous tablet interface was an interesting ...

Day of the Tentacle Remastered's slick interface works flawlessly
When we learned at the PlayStation Experience keynote that Day of the Tentacle Remastered was releasing March 2016, I wrote that it had been ...

Digitimes Research: Pogo Pin to account for over 60% of power charging interfaces used in smart wearable ...
Pogo Pin will account for over 60% of power charging interfaces used in smart watches and smart bands in 2016, all types of USB together for ...

Google Camera Receiving Update for Android 6.0+ Devices, Includes New Interface
Google Camera , Mountain View’s in-house shooter software for Android devices, is receiving an update to build 3.1. Inside, the new UI that is ...

Resources last updated: 12/22/2015 6:49:03 AM