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

  • 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: Delphi 2005 update 1 is out!
    ... Delphi 2005 Update 1 Fixes ... When importing an assembly if the types Pointer or Exception are used ... bdpDataAdapter can cause the IDE to lose all key stroke events until ... Using a remote data module may cause an Access Violation. ...
    (borland.public.delphi.non-technical)
  • Re: Delphi Update one... are you serious?
    ... Delphi 2005 Update 1 Fixes ... When importing an assembly if the types Pointer or Exception are used ... bdpDataAdapter can cause the IDE to lose all key stroke events until ... Using a remote data module may cause an Access Violation. ...
    (borland.public.delphi.non-technical)
  • Re: Why arent you upgrading?
    ... Stable IDE - this is first and foremost before anything else. ... MS alternate choice - As I see it the reason Delphi became so ... better database support ... Then announce that 64-bit native compiler is in progress and started. ...
    (borland.public.delphi.non-technical)
  • Re: So Long and Thanks for all the Fish!
    ... I think Borland and Delphi needs a .NET story of some kind, ... I'm not so sure the market is engrossed with .NET any more than it was ... The IDE is already very much a .NET IDE ... Refactoring and Together are easy enough to replace if CodeGear is ...
    (borland.public.delphi.non-technical)