Re: Delphi ADO EOleException "An unknown error has occured"



As I wrote earlier, "Switching off trapping EOleException is not an option as we are trying to trap
EOleException errors elsewhere". If you're looking for a real EOleException, the ones generated by this problem get in the way.


"Kevin Frevert" <kevin@xxxxxxxxxxxxxxxxxxxxxxxx> wrote in message news:47275903@xxxxxxxxxxxxxxxxxxxxxxxxx
It's a handled internal exception you can ignore when running your apps inside the IDE. Not sure exactly where in D2006, but should be in the ballpark of: Tools->Options->Debugger Options->Codegear Debuggers->Language Exceptions

Good luck,
krf

"Aaron Gnome" <gnone@xxxxxxxxx> wrote in message news:47270de0@xxxxxxxxxxxxxxxxxxxxxxxxx
When I run an application, connected to a SQL server database via ADO, in the IDE I get an EOleException, "An unknown error has occured", but when I run the application outside the IDE, there's no problem. Switching off trapping EOleException is not an option as we are trying to trap EOleException errors elsewhere.

I understand that this is due to LookupCache being set (by default) to false, causing the code to call TCustomADODataSet.LocateRecord, via TCustomADODataSet.Lookup and TField.CalcLookupValue.

The application I'm trying to fix is rather large and there are about 150 lookup fields. Setting LookupCache can cause problems for us, so the solution we've come up with is to delete them all together, replacing them with another solution. This is an arduous task, as you can imagine, not one I'm looking forward to. Okay that's my problem.

What I'd like to know is this. Why does the IDE flag the error but not the application? The second question is, has this been fixed in Delphi 2007 (we're using Delphi 2006 and I've seen reports of this going back to Delphi 5, so I'm not optomistic)?



.



Relevant Pages

  • Delphi ADO EOleException "An unknown error has occured"
    ... When I run an application, connected to a SQL server database via ADO, in the IDE I get an EOleException, "An unknown error has occured", but when I run the application outside the IDE, there's no problem. ... I understand that this is due to LookupCache being set to false, causing the code to call TCustomADODataSet.LocateRecord, via TCustomADODataSet.Lookup and TField.CalcLookupValue. ... The second question is, has this been fixed in Delphi 2007? ...
    (borland.public.delphi.database.ado)
  • Re: Delphi ADO EOleException "An unknown error has occured"
    ... the IDE I get an EOleException, "An unknown error has occured", but when I ... I understand that this is due to LookupCache being set to ... has this been fixed in Delphi 2007 ...
    (borland.public.delphi.database.ado)
  • Re: EOleException...
    ... No, only in the IDE... ... I can just switch of the EOleException in the debugger options - I ...
    (borland.public.delphi.database.ado)