An operations error occurred delphi

an operations error occurred delphi

When I exit my Delphi application I get this error: EInvalidPointer, 'Invalid pointer operation'. The mystery gets deeper. Delphi uses the event handling approach to error handling. Errors are (mostly) treated as exceptions, which cause program operation to suspend and jump to the. We encounted the problem “An operations error occurred” when we are submitting th 542582. I am migrating from Delphi 2007 to Delphi 2009 (June2009).

Thematic video

how to activate delphi ds150e 2014.r2

An operations error occurred delphi - think

Handling Database Errors

Last Updated on Thu, 10 Feb 2022 Mastering Delphi

Another important element of database programming is handling database errors in custom ways. Of course, you can let Delphi show an exception message each time a database error occurs, but you might want to try to correct the errors or simply show more details. There are basically three approaches you can use to handle database-related errors:

  • You can wrap a try/except block around risky database operations, such as a call to the Open method of a Query or to the Post method of a dataset. This is not possible when the operation is generated by the interaction with a data-aware control.
  • You can install a handler for the OnException event of the global Application object or use the ApplicationEvents component, as described in the next example.
  • You can handle specific events of the datasets related to errors, as OnPostError, OnEditError, OnDeleteError, and OnUpdateError. These events will be discussed later in the example.

While most of the exception classes in Delphi simply deliver an error message, with database exceptions you see a list of errors, showing local BDE error codes and also the native error codes of the SQL server you are connected to. Besides the Message property, the EDBEngineError class has two more properties, ErrorCount and Errors. This last property is a list of errors:

property Errors[Index: Integer]: TDBError;

Each item within this list is an object of the class TDBError, which has the following properties: type

TDBError = class public property Category: Byte read GetCategory; property ErrorCode: DBIResult read FErrorCode; property SubCode: Byte read GetSubCode; property Message: string read FMessage; property NativeError: Longint read FNativeError; end;

I've used this information to build a simple database program showing the details of the errors in a memo component. To handle all of the errors, the DBError example installs a handler for the OnException event of an ApplicationEvents component. The event handler simply calls a specific method used to show the details of the database error, in case it is an EDBEngineError:

procedure TForm1.ApplicationEvents1Exception (Sender: TObject; E: Exception); begin Beep;

if E is EDBEngineError then

ShowError (EDBEngineError (E)) else

ShowMessage (E.Message);

end;

I decided to separate the code used to show the error to make it easier for you to copy this code and use it in different contexts. Here is the code of the ShowError method, which outputs all of the available information to the Memo1 component that I've added to the form:

procedure TForm1.ShowError(E: EDBEngineError); var

I: Integer; begin

  1. Lines.Add( ");
  2. Lines.Add('Error: ' + (E.Message));
  3. Lines.Add('Number of errors: ' + IntToStr(E.ErrorCount)); // iterate through the Errors records for I := 0 to E.ErrorCount - 1 do begin
  4. Lines.Add( Memo1.Lines.Add( Memo1.Lines.Add( Memo1.Lines.Add( Memo1.Lines.Add( Memo1.Lines.Add( end; end;

Category: ' + IntToStr(E.Errors[I].Category)); Error Code: ' + IntToStr(E.Errors[I].ErrorCode)); SubCode: ' + IntToStr(E.Errors[I].SubCode)); Native Error: ' + IntToStr(E.Errors[I].NativeError));

Besides this error-handling code, the program has a table and a query, along with the error-related event handlers. As already mentioned, you can install an event handler related to specific errors of a dataset. The three events OnPostError, OnDeleteError, and OnEditError have the same structure. Their handlers receive as parameters the dataset, the error itself, and an action you can request from the system; this can be set to daFail, daAbort, or daRetry:

procedure TForm1.Table1PostError(DataSet: TDataSet; E: EDatabaseError;

var Action: TDataAction); begin

Memo1.Lines.Add (' -> Post Error: ' + E.Message); end;

If you don't specify an action, as in the code above, the default daFail is used, and the exception reaches the global handler. Using daAbort stops the exception and can be used if your event handler already displays a message. Finally, if you have a way to determine the cause of the error and fix it, you can use the daRetry action.

NOTE The fourth error event, OnUpdateError, has a different structure and is used along with cached updates as the information is sent back from the local cache to the database. This handler is important for handling update conflicts among different users as described in the next example.

The example has also a DBGrid connected with the table. You can use the DBGrid to perform some illegal operations, such as adding a new record with the same key as an existing one or trying to execute illegal SQL queries. Pressing the four buttons on the left of the memo generate errors, as you can see in Figure 13.23.

FIGURE 13.23:

The third button of the DBError form generates an exception with 17 database errors!

Continue reading here: An Overview of Client Server Programming

Was this article helpful?

Board index » delphi » Error Message "Operation Not Applicable"

John C. Nolan

Delphi Developer

Wed, 18 Jun 1902 08:00:00 GMT

Re:Error Message "Operation Not Applicable"


THANK YOU!!!

I have been following and posting messages for two weeks trying to solve this
problem.  I recently updated my server with Option Pack 4 and copying the old
sqlsrv32.dll back to the \winnt\system32 directory solved the problem.

I have a terrible time trying to find anything on microsoft.com.  Do you have the
URL of where I can download the lastest version of this file and any others that go
with it?

Thanks again,

John

Quote
Bernd Ua wrote:
> It's most likely an ODBC Driver Version of 3.50.0305 , which cannot handle
> parametrized queries.
> Came with NT Option Pack on my machine some time ago, actual version is
> somewhere round 3.7x.xxxx ( MSSQL7 or MDAC 2.1) , the older one 3.60.0319 ( MDAC
> 2.0 ) works , too.

> Try to upgrade your SQL Server ODBC Driver DLL ( file SQLSVR32.DLL ) to a newer
> version.

> You'll find MDAC Components on MS ADO/COM Download pages for free.

> HTH
> Bernd

> --
> Bernd Ua - Software-Haus Brumund GmbH
> [email protected]
> // to reply, remove nospam from email adress :-)
> // obviously this needs to be stated, too :  please no unsolicited private email
> unless explicitly invited

Contact US

Hi all!
I ran into the weirdest problem with an "Invalid floating point operation" error.

I'm using Delphi 2010, analyzing a stream of data. I did some tweaks to the code, added a few new algorithms, and suddenly Delphi threw the above mentioned error at a specific frame of my data. At first I was not surprised, because these things happen when you mess with the code. Problem was: Delphi never told me WHERE exactly the error occured!

Well, I had added my own little debug toy by implementing a form with a memo field. I created a little routine within that form that prints a message to the memo:

CODE --> delphi

procedure DebugPrint(sMessage: String); begin frmDebug.Show; frmDebug.Memo1.Lines.add( chr(10) + chr(13) + sMessage); End;

Then I added statements into my procedure that does all the data crunching, for instance:

CODE --> delphi

if iCurrentFrame > 1760 then DebugPrint('CalcLungArea: ' + IntToStr(iCurrentFrame));

With these messages, I wanted to track the progress of the procedure to see where it would break at frame 1763. So far so good, right?

Weird thing is, after I inserted that code, the error has DISAPPEARED.I have no idea why. Any ideas?

Oliver

RAD Studio operation error during community edition iinstall

I'm trying to install RAD Studio on Windows 10. I have the community edition and a license code for it. Every time I attempt to install I get the following error:

enter image description here

I have no idea why this happening and can't find anything via Google or their forums. Can't find any reference to actionID codes.

Delphi 10.3 seems to be installed, but it's incomplete as the only type of file it allows me to create is a .txt file. No Delphi related stuff:

enter image description here

Has anyone faced this problem before?

asked Jul 8, 2019 at 16:33

user avatar
BugHunterUKBugHunterUK

7,8901414 gold badges5858 silver badges108108 bronze badges

EInvalidPointer- "Invalid Pointer Operation" - NULL pointer ???

Indranil Bandyopadhyay's profile photo

Indranil Bandyopadhyay

unread,
Aug 23, 1998, 12:00:00 PM8/23/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to

hi !
Can someone help me, please.

When I exit my Delphi application I get this error:

EInvalidPointer, 'Invalid pointer
operation'

The mystery gets deeper.
a.) If I copy the executable to another machine - I do not get this
error !
b.) I reinstalled BDE onto both machines to see it if makes a difference
- No difference.
c.) I turned on/off all the optimizations/boolean evaluations to see if
it makes a difference - None.

I can debug the MainForm.OnClose.... to the last 'end;' and then I get
the error. I even though of putting
a try ... except on EInvalidPointer ....do nothing... to avoid the error
message. But I cannot even figure out
where to put this handler.

Does anyone know how to find a NULL pointer in Delphi.

Remember... In Borland CPP we do set something like (Char *) 0, 4 in
our watch window
and step though each line to see if we write over our NULL pointer.
Any equivalents for Delphi for a NIL pointer ??
All ideas appreciated.
ib
[email protected]

Jeff Rafter's profile photo

Jeff Rafter

unread,
Aug 24, 1998, 12:00:00 PM8/24/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to

What kind of machine and what version of Delphi are you using? (Actually
what are both of the machines you tested... video drivers or comctls.dll
versions?)

Good Luck,

Jeff Rafter, Realsoft Development
http://www.realsoftdev.com
[email protected]

Andrew Jackson's profile photo

Andrew Jackson

unread,
Aug 24, 1998, 12:00:00 PM8/24/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to

Sounds suspiciously like memory corruption between your app and the BDE or
other DLLs that you are using, to the point where the area of memory that
holds your functions gets corrupted so you code executes abnormally.
Usually very difficult to trace the problem unless you know what you did to
your code to first make the problem appear.

Try running your app through a 3rd party debugging tools such as Numega
Boundschecker or MemProof

http://www.nidlink.com/~astoyanov/index.htm

These can spot memory overruns etc.


Indranil Bandyopadhyay wrote in message <[email protected]>...

Indranil Bandyopadhyay's profile photo

Indranil Bandyopadhyay

unread,
Aug 26, 1998, 12:00:00 PM8/26/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to Jeff Rafter

Jeff Rafter wrote:

> What kind of machine and what version of Delphi are you using? (Actually
> what are both of the machines you tested... video drivers or comctls.dll
> versions?)

Jeff,

Both machines are identical (NT clients P166-same video and network cards).
They were bought at the same time as network clients. I am using Delphi 3.0.

I ran Boundschecker and found the messages from boundschecker too
overwhelming to be of any use.

I had more success with MemProof and it pointed to the last 'end;' in my
project.dpr file and reported:

{$R *.RES}

begin
Application.Initialize;
Application.Title := 'Lot Management System V4.00';
Application.CreateForm(TMainForm, MainForm);
Application.CreateForm(TEntryForm, EntryForm);
Application.CreateForm(TTransferForm, TransferForm);
Application.CreateForm(TNewPartNoForm, NewPartNoForm);
Application.CreateForm(TDM, DM);
Application.Run;
end. <----- DestroyCursor(5174): Unknown Win32 Error

My 'stack trace' shows:

$0002E90C TScreen.GetFormCount in Forms (0)
$000027BB @TryFinallyExit in System (0)
$000029DA @Halt0 in System (0)
$00018344 initialization in Lms400.dpr (31)
$00018344
$000181F6

I am not really good at reading stack traces and memory dumps yet. Hope
someone will see something and guide me in the right direction.

All I know is that when my application exists. It calls

DestroyCursor(xxxx);

I do not do any cursor manipulation in my application which is a simple
database application.
The only thing I plan to do next is to begin commenting out my code with the
last changes first and see where the problem disappears.

Also I noticed when I 'build' for the debuggers some parts {structure
initializations} of my code cause execptions. Looks like I have something
even more dangerous living in my code.

All help appreciated.

ib
[email protected]

Atanas Stoyanov's profile photo

Atanas Stoyanov

unread,
Aug 26, 1998, 12:00:00 PM8/26/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to

Hi Indranil,

>end. <----- DestroyCursor(5174): Unknown Win32 Error
>
>My 'stack trace' shows:
>
>$0002E90C TScreen.GetFormCount in Forms (0)
>$000027BB @TryFinallyExit in System (0)
>$000029DA @Halt0 in System (0)
>$00018344 initialization in Lms400.dpr (31)
>$00018344
>$000181F6

I am afraid that this output from MemProof just shows a standard VCL error
(the VCL code attempts to destroy a cursor that it did not create). This
error is "benign" {well, almost} and is certainly not the cause of your
trouble.

Also from your call stack, it seems that you did not inlude the VCL in your
project build. Including the VCL source code will give you much more
information as or the origin of oyur error.What you can do is fropm
Project/Options/Directries and in the Search Path edit box, type
c:\delphi3\source\vcl; {where c:\delphi3 is your Delphi directory}.

There are two ways that MemProof could be usefull for you to track such an
error (try one of the two first):

*) You can do the following : From MemProof select Options/Trace Stack on
Exception. Run your program and try to reproduce the EInvalidPointer error.
When the error occurs, if you open the debug window in MemProof (View/Debug
Output Window or Ctrl+D), MemProof will show you the call stack of how the
exception occured. Hopefully this willlead youto the origin of the
EInvalidPointer exception in your source code.

*) You can set the Options/Check for Memory Overruns and Options/Error on
invalid Free to true (checked). Run you program and look if anymore errors
(items with the stop sign) are generated than without those options.


Before using you programin MemProof , just a reminder :
*Include the DELPHI\SLIB directory as part of your search path.
*Compile with Stack frames.
*Include the VCL source directory in your Project/Directories options


If you have any troubles interpreting the output of MemProof or other
questions, please do not hesitate to contact me via private e-mail.


Atanas

MemPoof's Home :
http://www.nidlink.com/~astoyanov/index.htm

Indranil Bandyopadhyay's profile photo

Indranil Bandyopadhyay

unread,
Aug 26, 1998, 12:00:00 PM8/26/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to Atanas Stoyanov

Hello Atanas,

Thank you for all your helpful tips on using MemProof, I have tried to detect
my bug but have not been successful. One reason is that it does not occur
everytime at the same place. It appears to move around and
disable my code at different places. I will try again tomorrow and post my
findings here. Hope you can help.

MemProof It truly is a superb product. I have some rediculously simple
questions for you. Sorry I am not very good at understanding how debuggers
work.

My questions are what can I understand when I see the 'Live Pointer' or
'Virtual Memory' icon and source code window is highlighted with a line ?

Thank you again for your quick reply
ib

Jeff Rafter's profile photo

Jeff Rafter

unread,
Aug 26, 1998, 12:00:00 PM8/26/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to

>my bug but have not been successful. One reason is that it does not occur
>everytime at the same place. It appears to move around and
>disable my code at different places.

It sounds more and more like a stack error... check the size of your stack.

One more guess... are you using a Codebase database? (Or what database
engine / version?)

Jeff

Atanas Stoyanov's profile photo

Atanas Stoyanov

unread,
Aug 26, 1998, 12:00:00 PM8/26/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to

Hi Indranil,

First, thanks for your nice words about MemProof

>My questions are what can I understand when I see the 'Live Pointer' or
>'Virtual Memory' icon and source code window is highlighted with a line ?

Live Pointers :
Live Pointers are your most important leaks. You should always try to fix
those memory leaks first. They are native Delphi memory that you allocated
by either creating a class, a huge string, using functions like GetMem and
New etc.
In this area MemProof can help with more info when you have the
Options/Translate pointers enabled (the default). While running your
program, if you double click on the live pointers entry, MemProof will
display a list of all the live pointers currently allocated in your program
and in the Name column you migh see their class names like :

TMemo <class> - this indicates a TMemo class that is in memory.

Also MemProof will show long strings like that :
November <string> - This indicates that you (or the VCL) have allocated
memoryu for a long string and the contetnt of this string is 'November'.

This functionality of MemProof is available only while your program is
running, because those strings are allocated in the address space of your
program. So if you want the final leaks report to include those meaningfull
names, just before exiting your program, select for once the View/Snapshot
of all resources (you can immediatelly after that close this view). This
will make MemProof to translate the Delphi pointers to strings and might
help you determine what are your exact leaks - it's often helpfull to know
that you have a specific class name that is not being freed.

Virtual Memory :

The virtual memory counters are reflecting the amount of memory that your
application is requesting from the operating system (Windows) via WinAPI
functions like VirtualAlloc etc.
Even if you do not use the VirtualAlloc functions yourself, behind the
scenes the Delphi Memory manager is using them. In fact the Delphi Memory
Manager is allocating chunks of 16 K memory from the OS and then is
distributing those 16k regions as 'live pointers' requests to your
application. So if you forget to free a live pointer, the delphi memory
manager will not free the corresponding 16K virtual memory region. You can
see that this way a small pointer of a couple of bytes might cause a real
memory leak of 16 K bytes to the operating system.
Even tough it is very instructif to see how the Delphi Memory Manager is
allocating its memory from the operating system, if you are not using
VirtualAlloc functions yourself, you might disregard this entry.
Always keep in mind that if you solve the Live Pointers leaks in your
application, the Virtual Memory leaks will be solved as well (except a leak
of 4096 bytes that is always there because forms.pas forgets to free 4K of
memory once for every application).


Thanks
Atanas

Indranil Bandyopadhyay's profile photo

Indranil Bandyopadhyay

unread,
Aug 27, 1998, 12:00:00 PM8/27/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to Atanas Stoyanov

Hello Atanas,

I understand a lot more about MemProof now. I like the fact MemProof can show
me what resources are allocated at runtime (Cntrl-D). I think I understand how
debuggers work better now. MemProof keeps track of all the allocations and
deallocations and on termination tells me what is 'not' deallocated. Therein
should lie my problem.

I tried to make my application fail with exceptions today but could not.
However that did not stop me from learning more about MemProof and my
application. I created a simple delphi form added more components and methods
to it just to see what MemProof reported.

The live pointers reported when my application terminates are:

[Area Item Current# Peak# CurrentSize Peak
Size]
-----------------------------------------------------------------------------
A. Pointers Live Pointer 4 1771
118 104986
B. Memory Virtual Memory 1 8 16384
118784


A. Live Pointer Errors:
-----------------------
i.)
TCaptureFields <class>
O := TCaptureFields.Create;

My guess is that I am not deallocating memory here. Using Delphi IDE I had at
one time got an exception
at the constructor ? I have used this piece of code for about a year now but I
guess it is a source of a memory
leak.

{ CaptureFields Object - constructor
}
constructor TCaptureFields.Create;
begin <---------- BCB
DisplaySeq :=0;
DisplayLbl :='';
FldAddEdit :=False;
end;
{Create}

Defined as ....., Hmmm.... I don't see any memory overruns or anything.
type
TCaptureFields = class
DisplaySeq : SmallInt;
DisplayLbl : string[15];
FldAddEdit : Boolean;

constructor Create;
end; // CaptureFields

Question: I changed to SmallInt->Integers and String[15] to Strings (checking
for overruns) but it made no difference. I may have to step throught the code
to see if I leave any residue. By the way bounds checker
bombs with an 'access exception' in the intialization code marked (BCB) above.


The other two Live Pointer Errors are also interesting.

ii)
in function UnLogApplication: Boolean

FindKey([WorkstationNum]); <--------- Line 712 Live Pointer Error
Three Stack entries, two the same number
Stack trace
Stack trace
No Stack trace


Stack Display in MemProof
StrPas(0)
TAdsTable.GetIndexFieldNames in AdsTable (0)
TAdsTable.SetKeyFields in AdsTable (0)
TAdsTable.FindKey in AdsTable (0)

This FindKey is calling TAdsTable.Findkey of the Advantage {extended systems
database engine}. This is supposed to be the same as the delphi FindKey.

I am using FindKey only once in my code. I will change it to 'AdsSeek' and see
if it makes any difference tomorrow.
Question: Is it possible that I am getting an error because I am not checking
the Boolean return value from FindKey?

iii)
VirtualAlloc(xxxxxx) Virtual Memory

try
DM.ShippedFindTable.Active:=True; <------------------Virtual Alloc
Problem
except on EDataBaseError do
Memo2.Lines.Add('Cannot Open ShippedFindTable'+
DM.ShippedFindTable.DatabaseName+' '+
DM.ShippedFindTable.TableName );
end;

Question: Is this not odd ? I am opening six database one after another yet it
points to this line everytime reporting Virtual Allocation Error. Do you have
any ideas ?


I know I am asking you a lot of information and many of my questions are
probably very silly. I realize that you are extremely busy and I want to thank
you again for helping me to debug this project.

Do you know any URL's or books that I should read so that I can debug much
better with MemProof ?

I really really appreciate all your comments. :) Thanks again for MemProof !!

Yours Sincerely,

IB

Indranil Bandyopadhyay's profile photo

Indranil Bandyopadhyay

unread,
Aug 27, 1998, 12:00:00 PM8/27/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to Jeff Rafter

Jeff Rafter wrote:

> >my bug but have not been successful. One reason is that it does not occur
> >everytime at the same place. It appears to move around and
> >disable my code at different places.

> It sounds more and more like a stack error... check the size of your stack.

Min Stack $00004000Max Stack $00100000
Image Base $00400000

> One more guess... are you using a Codebase database? (Or what database
> engine / version?)
>

You could be right on the money. I changed over to Advantage Database from
Borland Paradox.Just replaced the TTable -> TAdsTable.

If I am reading it right MemProof points to TAdsTable.FindKey as a Virtual
memory hog.
and

i.]
FindKey([WorkstationNum]); <------------- LivePonter Problem.

ii.]

try
DM.ShippedFindTable.Active:=True; <--------------Virtual Alloc Problem


except on EDataBaseError do
Memo2.Lines.Add('Cannot Open ShippedFindTable'+
DM.ShippedFindTable.DatabaseName+' '+
DM.ShippedFindTable.TableName );
end;

It could be the product or it could be bad programming practice on my part.
What was your guess with codebase?

I am looking into every option possible to fix the EInvalidPointer Exception. I
have never got it under MemProof or BoundChecker. Although BoundsChecker
'itself' gave an exception error

" Exception EInvalidPointer in Module BCCORE.DLL at 0005D62C.
Invalid pointer operation. "

Then it just shut my machine down!!

I guess that my code must be too bad for bondschecker to resolve <g>.

Have to hand it to MemProof though, although I am having a hard time
interpreting the results {my own inadequacy, it has stuck along this far.}

All suggestions accepted.

Thanks for your help,

IBI

Indranil Bandyopadhyay's profile photo

Indranil Bandyopadhyay

unread,
Aug 27, 1998, 12:00:00 PM8/27/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to Atanas Stoyanov

Atanas,

MemProof Rocks !

With the additional information about the vcl that you provided I thought I
would
add some more information.

The problem is releasing a TList Object at location (1) below.

The EInvalidPointer occurs only once when the application shuts down. At this
time 'NewCapacity' is a huge number but it cannot be since the Stack Trace is
TList.Clear.?? I will verify this again tomorrow.

I will try to locate which TList component it is trying to release and work a
fix around this.

I want to thank you for being there to help me out.

ib
[email protected]


Call Stack is:
------------
TList.Destroy
TList.Clear
TList.Destroy
TComponent.DestroyComponents
TComponent.Destroy
TDataModule.Destroy
TComponent.DestroyComponents
DoneApplication
Lms400

Watch List
-----------
FList: $37F17D4
NewCapacity:0
SizeOf(Pointer):4
FCapacity:4


..\source\vcl\Class.Pas - called from forms.pas below
-----------------------
procedure TList.SetCapacity(NewCapacity: Integer);
begin
if (NewCapacity < FCount) or (NewCapacity > MaxListSize) then
Error(SListCapacityError, NewCapacity);
if NewCapacity <> FCapacity then
begin
ReallocMem(FList, NewCapacity * SizeOf(Pointer)); <---- (1)
FCapacity := NewCapacity;
end;
end;

Exception EInvalidPointer in Module... Invalid Pointer Operation

Called from ..\vcl\Forms.pas
-----------------------------
procedure DoneApplication;
begin
with Application do
begin
if Handle <> 0 then ShowOwnedPopups(Handle, False);
ShowHint := False;
Destroying;
DestroyComponents;
end;
end;

Jeff Rafter's profile photo

Jeff Rafter

unread,
Aug 28, 1998, 12:00:00 PM8/28/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to

Indranil,

I don't really understand the results you are getting from memproof as I
have never used an application of that sort, but if the problem seems to
correspond to the database change-over I would be thinking the problem lays
down that road.

Have you tried asking if this is a common problem through their tech
support? And is it possible to revert to another database engine
temporarily to test if that is infact the problem...

I was looking at your earlier post and thought "I bet the databases
<internal cursor> is causing the problem" Then I thought... "but why would
the two machines be different?" and then thought this: "Are the results the
same if you run the application outside of delphi? (do you still get the
error on both machines) and what dlls (or dpls) if any are being deployed
with your database engine."

I recently screwed up my freinds computer by installing a program (that I
wrote) to his machine to "show off." Instead of praise and accolades my
install overwrote a system critical dll... oops. He couldn't get anything
to work right until we figured it out.

Good luck,

Jeff
[email protected]

Atanas Stoyanov's profile photo

Atanas Stoyanov

unread,
Aug 30, 1998, 12:00:00 PM8/30/98

Reply to author

Sign in to reply to author

Forward

Sign in to forward

Delete

Link

Report message as abuse

Sign in to report message as abuse

Show original message

Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message

to

Hi Indranil,

>I am removing all the 'live pointers' in my code and hoping it will remove
the
>problems that I began this discussion with.


Yes, this sounds like a good approach.

>I have two simple question about MemProof.
>
>What is the Kind=Event it has an 'atomic-nuclear' icon.
>MemProof says:
>
>CreateEvent(00000000, -1, -1, 0); at my code:
>OverlappedCommEvent.hEvent := CreateEvent(nil, True, True, nil);


The 'atomic-nuclear' icon are resources allocated from the Windows Kernel
DLL (kernel32.dll).

In MemProof, the Kind = Event are events (in the WinAPI sense of the term)
objects. If you forget to free such objects, they result in 'resource'
leaks.

You create such objects with the

CreateEvent(..) WinAPI

and you free such objects with the

CloseHandle (...) WinAPI

>My guess is that it cannot create that event.

Not really - If it cannot create that event, MemProof would display an error
entry (Kind = Error - with the stop sign icon). In your case (Kind = Event),
MemProof shows that the event has been successfully created and will have to
be freed.
If the event is part of the final leaks reports, then you forgot to free the
event handle and should add a line like
CloseHandle(OverlappedCommEvent.hEvent).


Hope this clears it

Atanas

EDB_ERROR_VALIDATE (100)There is an error in the metadata for the <ObjectType> <ObjectName> (<ErrorMessage>)This error is raised whenever an attempt is made to create a new catalog or configuration object, and there is an error in the specification of the object. The specific error message is indicated within the parentheses.EDB_ERROR_UPDATE (101)There was an error updating the <ObjectType> <ObjectName> (<ErrorMessage>)This error is raised whenever ElevateDB encounters an issue while trying to update the disk file used to store a catalog or configuration. The specific error message is indicated within the parentheses.EDB_ERROR_SYSTEM (200)This operation cannot be performed on the system <ObjectType> <ObjectName> or any privileges granted to itThis error is raised whenever an attempt is made to alter or drop any system-defined catalog or configuration objects. Please see the System Information topic for more information on the system-defined objects in ElevateDB.EDB_ERROR_DEPENDENCY (201)The <ObjectType> <ObjectName> cannot be dropped or moved because it is still referenced by the <ObjectType> <ObjectName>This error is raised whenever an attempt is made to drop any catalog or configuration object, and that catalog or configuration object is still being referenced by another catalog or configuration object. You must first remove the reference to the object that you wish to drop before you can drop the referenced object.EDB_ERROR_MODULE (202)An error occurred with the module <ModuleName> (<ErrorMessage>)This error is raised whenever ElevateDB encounters an issue with loading an external module. Please see the External Modules topic for more information.EDB_ERROR_LOCK (300)Cannot lock <ObjectType> <ObjectName> for <AccessType> accessThis error is raised whenever ElevateDB cannot obtain the desired lock access to a given object. This is usually due to another session already having an incompatible lock on the object already. Please see the Locking topic for more information.EDB_ERROR_UNLOCK (301)Cannot unlock <ObjectType> <ObjectName> for <AccessType> accessThis error is raised whenever ElevateDB cannot unlock a given object. If this error occurs during normal operation of ElevateDB, please contact Elevate Software for further instructions on how to correct the issue.EDB_ERROR_EXISTS (400)The <ObjectType> <ObjectName> already existsThis error is raised whenever an attempt is made to create a new catalog or configuration object, and a catalog or configuration object already exists with that name.EDB_ERROR_NOTFOUND (401)The <ObjectType> <ObjectName> does not existThis error is raised when an attempt is made to open/execute, alter, or drop a catalog or configuration object that does not exist.EDB_ERROR_NOTOPEN (402)The database <DatabaseName> must be open in order to perform this operation (<OperationName>)This error is raised when an attempt is made to perform an operation on a given database before it has been opened.EDB_ERROR_READONLY (403)The <ObjectType> <ObjectName> is read-only and this operation cannot be performed (<OperationName>)This error is raised whenever a create, alter, or drop operation is attempted on an object that is read-only.EDB_ERROR_TRANS (404)Transaction error (This operation cannot be performed while the database <DatabaseName> has an active transaction (<OperationName>))This error is raised whenever ElevateDB encounters an invalid transaction operation. Some SQL statements cannot be executed within a transaction. For a list of transaction-compatible statements, please see the Transactions topic.EDB_ERROR_MAXIMUM (405)The maximum number of <ObjectType>s has been reached (<MaximumObjectsAllowed>)This error is raised when an attempt is made to create a new catalog or configuration object and doing so would exceed the maximum allowable number of objects. Please see the Appendix B - System Capacities topic for more information.EDB_ERROR_IDENTIFIER (406)Invalid <ObjectType> identifier '<ObjectName>'This error is raised when an attempt is made to create a new catalog or configuration object with an invalid name. Please see the Identifiers topic for more information on what constitutes a valid identifier.EDB_ERROR_FULL (407)The table <TableName> is full (<FileName>)This error occurs when a given table contains the maximum number of rows or the maximum file size is reached for one of the files that make up the table. The file name is indicated within the parentheses.EDB_ERROR_CONFIG (409)There is an error in the configuration (<ErrorMessage>)This error is raised whenever there is an error in the configuration. The specific error message is indicated within the parentheses.EDB_ERROR_NOLOGIN (500)A user must be logged in in order to perform this operation (<OperationName>)This error is raised whenever an attempt is made to perform an operation for a session that has not been logged in yet with a valid user name and password.EDB_ERROR_LOGIN (501)Login failed (<ErrorMessage>)This error is raised whenever a user login fails. ElevateDB allows for a maximum of 3 login attempts before raising a login exception.EDB_ERROR_ADMIN (502)Administrator privileges are required to perform this operation (<Operation>)This error is raised when an attempt is made to perform an operation that requires administrator privileges. Administrator privileges are granted to a given user by granting the system-defined "Administrators" role to that user.

Please see the User Security topic for more information.EDB_ERROR_PRIVILEGE (503)The current user does not have the proper privileges to perform this operation (<OperationName>)This error is raised when a user attempts an operation when he/she does not have the proper privileges required to execute the operation. Please see the User Security topic for more information.EDB_ERROR_MAXSESSIONS (504)Maximum number of concurrent sessions reached for the configuration <ConfigurationName>This error is raised when the maximum number of licensed sessions for a given configuration is exceeded. The number of licensed sessions for a given configuration depends upon the ElevateDB product purchased along with the particular compilation of the application made by the developer using the ElevateDB product.EDB_ERROR_SERVER (505)The ElevateDB Server cannot be started (<ErrorMessage>) The ElevateDB Server cannot be stopped (<ErrorMessage>)This error is raised when the ElevateDB Server cannot be started or stopped for any reason. Normally, the error message will contain a native operating system error message that will reveal the reason for the issue.EDB_ERROR_FILEMANAGER (600)File manager error (<ErrorMessage>)This error is raised whenever ElevateDB encounters a file manager error while trying to create, open, close, delete, or rename a file. The specific error message, including operating system error code (if available), is indicated within the parentheses.EDB_ERROR_CORRUPT (601)The table <TableName> is corrupt (<ErrorMessage>)This error is raised when ElevateDB encounters an issue while reading, writing, or validating a table. If this error occurs during normal operation of ElevateDB, please contact Elevate Software for further instructions on how to correct the issue. The specific error message is indicated within the parentheses.EDB_ERROR_COMPILE (700)An error was found in the <ObjectType> at line <Line> and column <Column> (<ErrorMessage>)This error is raised whenever an error is encountered while compiling an SQL expression, statement, or routine. The specific error message is indicated within the parentheses.EDB_ERROR_BINDING (800)A row binding error occurredThis error is raised when ElevateDB encounters an issue while trying to bind the cursor row values in a cursor row. It is an internal error and will not occur unless there is a bug in ElevateDB.EDB_ERROR_STATEMENT (900)An error occurred with the statement <StatementName> (<ErrorMessage>)This error is raised whenever an issue is encountered while executing a statement. The specific error message is indicated within the parentheses.EDB_ERROR_PROCEDURE (901)An error occurred with the procedure <ProcedureName> (<ErrorMessage>)This error is raised whenever an issue is encountered while executing a procedure. The specific error message is indicated within the parentheses.EDB_ERROR_VIEW (902)An error occurred with the view <ViewName> (<ErrorMessage>)This error is raised whenever an issue is encountered while opening a view. The specific error message is indicated within the parentheses.EDB_ERROR_JOB (903)An error occurred with the job <JobName> (<ErrorMessage>)This error is raised whenever an issue is encountered while running a job. The specific error message is indicated within the parentheses.EDB_ERROR_IMPORT (904)Error importing the file <FileName> into the table <TableName> (<ErrorMessage>)This error is raised when an error occurs during the import process for a given table. The specific error message is indicated within the parentheses.EDB_ERROR_EXPORT (905)Error exporting the table <TableName> to the file <FileName> (<ErrorMessage>)This error is raised when an error occurs during the export process for a given table. The specific error message is indicated within the parentheses.EDB_ERROR_CURSOR (1000)An error occurred with the cursor <CursorName> (<ErrorMessage>)This error is raised whenever an issue is encountered while operating on a cursor. The specific error message is indicated within the parentheses.EDB_ERROR_FILTER (1001)A filter error occurred (<ErrorMessage>)This error is raised whenever ElevateDB encounters an issue while trying to set or clear a filter on a given cursor. The specific error message is indicated within the parentheses.EDB_ERROR_LOCATE (1002)A locate error occurred (<ErrorMessage>)This error is raised whenever ElevateDB encounters an issue while trying to locate a row in a given cursor. The specific error message is indicated within the parentheses.EDB_ERROR_STREAM (1003)An error occurred in the cursor stream (<ErrorMessage>)This error is raised whenever an issue is encountered while loading or saving a cursor to or from a stream. The specific error message is indicated within the parentheses.EDB_ERROR_CONSTRAINT (1004)The constraint <ConstrainName> has been violated (<ErrorMessage>)This error is raised when a constraint that has been defined for a table is violated. This includes primary key, unique key, foreign key, and check constraints. The specific error message is indicated within the parentheses.EDB_ERROR_LOCKROW (1005)Cannot lock the row in the table <TableName>This error is raised when a request is made to lock a given row and the request fails because another session has the row already locked. Please see the Locking topic for more information.EDB_ERROR_UNLOCKROW (1006)Cannot unlock the row in the table <TableName>This error is raised whenever ElevateDB cannot unlock a specific row because the row had not been previously locked, or had been locked and the lock has since been cleared. Please see the Locking topic for more information.EDB_ERROR_ROWDELETED (1007)The row has been deleted since last cached for the table <TableName>This error is raised whenever an attempt is made to update or delete a row, and the row no longer exists because it has been deleted by another session. Please see the Updating Rows topic for more information.EDB_ERROR_ROWMODIFIED (1008)The row has been modified since last cached for the table <TableName>This error is raised whenever an attempt is made to update or delete a row, and the row has been updated by another session since the last time it was cached by the current session. Please see the Updating Rows topic for more information.EDB_ERROR_CONSTRAINED (1009)The cursor is constrained and this row violates the current cursor constraint condition(s)This error is raised when an attempt is made to insert a new row into a constrained cursor that violates the filter constraints defined for the cursor. Both views defined in database catalogs and the result sets of dynamic queries can be defined as constrained, and the filter constraints in both cases are the WHERE conditions defined for the underlying SELECT query that the view or dynamic query is based upon.EDB_ERROR_ROWVISIBILITY (1010)The row is no longer visible in the table <TableName>This error is raised whenever an attempt is made to update or delete a row within the context of a cursor with an active filter or range condition, and the row has been updated by another session since the last time it was cached by the current session, thus causing it to fall out of the scope of the cursor's active filter or range condition. Please see the Updating Rows topic for more information.EDB_ERROR_VALUE (1011)An error occurred with the <ObjectType> <ObjectName> (<ErrorMessage>)This error is raised whenever an attempt is made to store a value in a column, parameter, or variable and the value is invalid because it is out of range or would be truncated. The specific error message is indicated within the parentheses.EDB_ERROR_ROWCORRUPTED (1012)The row has been corrupted since last cached for the table <TableName>This error is raised whenever an attempt is made to update or delete a row, and the row buffer being used for the operation has been corrupted. This is typically due to improper multi-threaded access to the ElevateDB client engine.EDB_ERROR_CLIENTCONN (1100)A connection to the server at <ServerAddress> cannot be established (<ErrorMessage>)This error is raised when ElevateDB encounters an issue while trying to connect to a remote ElevateDB Server. The error message will indicate the reason why the connection cannot be completed.EDB_ERROR_CLIENTLOST (1101)A connection to the server at <ServerAddress> has been lost <ErrorMessage>)This error is raised when ElevateDB encounters an issue while connected to a remote ElevateDB Server. The error message will indicate the reason why the connection was lost.EDB_ERROR_INVREQUEST (1103)An invalid or unknown request was sent to the serverThis error is raised when an ElevateDB Server encounters an unknown request from a client session.EDB_ERROR_ADDRBLOCK (1104)The IP address <IPAddress> is blockedThis error is raised when a session tries to connect to an ElevateDB Server, and the originating IP address for the session matches one of the configured blocked IP addresses in the ElevateDB Server, or does not match one of the configured authorized IP addresses in the ElevateDB Server.EDB_ERROR_ENCRYPTREQ (1105)An encrypted connection is requiredThis error is raised when a non-encrypted session tries to connect to an ElevateDB Server that has been configured to only accept encrypted session connections.EDB_ERROR_SESSIONNOTFOUND (1107)The session ID <SessionID> is no longer present on the serverThis error is raised whenever a remote session attempts to reconnect to a session that has already been designated as a dead session and removed by the ElevateDB Server. This can occur when a session is inactive for a long period of time, or when the ElevateDB Server has been stopped and then restarted.EDB_ERROR_SESSIONCURRENT (1108)The current session ID <SessionID> cannot be disconnected or removedThis error is raised whenever a remote session attempts to disconnect or remove itself.EDB_ERROR_COMPRESS (1200)An error occurred while compressing data (<ErrorMessage>)This error is raised when ElevateDB encounters an issue while attempting to compress data. It is an internal error and will not occur unless there is a bug in ElevateDB. The specific error message is indicated within the parentheses.EDB_ERROR_DECOMPRESS (1201)An error occurred while uncompressing data (<ErrorMessage>)This error is raised when ElevateDB encounters an issue while attempting to decompress data. It is an internal error and will not occur unless there is a bug in ElevateDB. The specific error message is indicated within the parentheses.EDB_ERROR_BACKUP (1300)Error backing up the database <DatabaseName> (<ErrorMessage>)This error is raised when any error occurs during the backing up of a database. The specific error message is indicated within the parentheses.EDB_ERROR_RESTORE (1301)Error restoring the database <DatabaseName> (<ErrorMessage>)This error is raised when any error occurs during the restore of a database. The specific error message is indicated within the parentheses.EDB_ERROR_PUBLISH (1302)Error backing up the database <DatabaseName> (<ErrorMessage>)This error is raised when any error occurs during the backing up of a database. The specific error message is indicated within the parentheses.EDB_ERROR_UNPUBLISH (1303)Error unpublishing the database <DatabaseName> (<ErrorMessage>)This error is raised when any error occurs during the unpublishing of a database. The specific error message is indicated within the parentheses.EDB_ERROR_SAVEUPDATES (1304)Error saving updates for the database <DatabaseName> (<ErrorMessage>)This error is raised when any error occurs during the saving of the updates for a database. The specific error message is indicated within the parentheses.EDB_ERROR_LOADUPDATES (1305)Error loading updates for the database <DatabaseName> (<ErrorMessage>)This error is raised when any error occurs during the loading of the updates for a database. The specific error message is indicated within the parentheses.EDB_ERROR_STORE (1306)Error with the store <StoreName> (<ErrorMessage>)This error is raised when any error occurs while trying to access a store, such as a read or write error while working with files in the store. The specific error message is indicated within the parentheses.EDB_ERROR_CACHEUPDATES (1307)Error caching updates for the cursor <CursorName> (<ErrorMessage>)This error is raised when any error occurs during the caching of updates for a specific table, view, or query cursor. The specific error message is indicated within the parentheses.EDB_ERROR_FORMAT (1400)Error in the format string <FormatString> (<ErrorMessage>)This error is raised when ElevateDB encounters an issue with a format string used in a date, time, or timestamp format used in a table import or export. The specific error message is indicated within the parentheses.

Opinion: An operations error occurred delphi

An operations error occurred delphi
An operations error occurred delphi
EPSON PHOTO R300 GENERAL ERROR
Error 26 sql

An operations error occurred delphi - think

Board index » delphi » Error Message "Operation Not Applicable"

John C. Nolan

Delphi Developer

Wed, 18 Jun 1902 08:00:00 GMT

Re:Error Message "Operation Not Applicable"


THANK YOU!!!

I have been following and posting messages for two weeks trying to solve this
problem.  I recently updated my server with Option Pack 4 and copying the old
sqlsrv32.dll back to the \winnt\system32 directory solved the problem.

I have a terrible time trying to find anything on microsoft.com.  Do you have the
URL of where I can download the lastest version of this file and any others that go
with it?

Thanks again,

John

Quote
Bernd Ua wrote:
> It's most likely an ODBC Driver Version of 3.50.0305 , which cannot handle
> parametrized queries.
> Came with NT Option Pack on my machine some time ago, actual version is
> somewhere round 3.7x.xxxx ( MSSQL7 or MDAC 2.1) , the older one 3.60.0319 ( MDAC
> 2.0 ) works , too.

> Try to upgrade your SQL Server ODBC Driver DLL ( file SQLSVR32.DLL ) to a newer
> version.

> You'll find MDAC Components on MS ADO/COM Download pages for free.

> HTH
> Bernd

> --
> Bernd Ua - Software-Haus Brumund GmbH
> [email protected]
> // to reply, remove nospam from email adress :-)
> // obviously this needs to be stated, too :  please no unsolicited private email
> unless explicitly invited

RAD Studio operation error during community edition iinstall

I'm trying to install RAD Studio on Windows 10. I have the community edition and a license code for it. Every time I attempt to install I get the following error:

enter image description here

I have no idea why this happening and can't find anything via Google or their forums. Can't find any reference to actionID codes.

Delphi 10.3 seems to be installed, but it's incomplete as the only type of file it allows me to create is a .txt file. No Delphi related stuff:

enter image description here

Has anyone faced this problem before?

asked Jul 8, 2019 at 16:33

user avatar
BugHunterUKBugHunterUK

7,8901414 gold badges5858 silver badges108108 bronze badges

Mastering Delphi

Another important element of database programming is handling database errors in custom ways. Of course, you can let Delphi show an exception message each time a database error occurs, but you might want to try to correct the errors or simply show more details. There are basically three approaches you can use to handle database-related errors:

  • You can wrap a try/except block around risky database operations, such as a call to the Open method of a Query or to the Post method of a dataset. This is not possible when the operation is generated by the interaction with a data-aware control.
  • You can install a handler for the OnException event of the global Application object or use the ApplicationEvents component, as described in the next example.
  • You can handle specific events of the datasets related to errors, as OnPostError, OnEditError, OnDeleteError, and OnUpdateError. These events will be discussed later in the example.

While most of the exception classes in Delphi simply deliver an error message, with database exceptions you see a list of errors, showing local BDE error codes and also the native error codes of the SQL server you are connected to. Besides the Message property, the EDBEngineError class has two more properties, ErrorCount and Errors. This last property is a list of errors:

property Errors[Index: Integer]: TDBError;

Each item within this list is an object of the class TDBError, which has the following properties: type

TDBError = class public property Category: Byte read GetCategory; property ErrorCode: DBIResult read FErrorCode; property SubCode: Byte read GetSubCode; property Message: string read FMessage; property NativeError: Longint read FNativeError; end;

I've used this information to build a simple database program showing the details of the errors in a memo component. To handle all of the errors, the DBError example installs a handler for the OnException event of an ApplicationEvents component. The event handler simply calls a specific method used to show the details of the database error, in case it is an EDBEngineError:

procedure TForm1.ApplicationEvents1Exception (Sender: TObject; E: Exception); begin Beep;

if E is EDBEngineError then

ShowError (EDBEngineError (E)) else

ShowMessage (E.Message);

end;

I decided to separate the code used to show the error to make it easier for you to copy this code and use it in different contexts. Here is the code of the ShowError method, which outputs all of the available information to the Memo1 component that I've added to the form:

procedure TForm1.ShowError(E: EDBEngineError); var

I: Integer; begin

  1. Lines.Add( ");
  2. Lines.Add('Error: ' + (E.Message));
  3. Lines.Add('Number of errors: ' + IntToStr(E.ErrorCount)); // iterate through the Errors records for I := 0 to E.ErrorCount - 1 do begin
  4. Lines.Add( Memo1.Lines.Add( Memo1.Lines.Add( Memo1.Lines.Add( Memo1.Lines.Add( Memo1.Lines.Add( end; end;

Category: ' + IntToStr(E.Errors[I].Category)); Error Code: ' + IntToStr(E.Errors[I].ErrorCode)); SubCode: ' + IntToStr(E.Errors[I].SubCode)); Native Error: ' + IntToStr(E.Errors[I].NativeError));

Besides this error-handling code, the program has a table and a query, along with the error-related event handlers. As already mentioned, you can install an event handler related to specific errors of a dataset. The three events OnPostError, OnDeleteError, and OnEditError have the same structure. Their handlers receive as parameters the dataset, the error itself, and an action you can request from the system; this can be set to daFail, daAbort, or daRetry:

procedure TForm1.Table1PostError(DataSet: TDataSet; E: EDatabaseError;

var Action: TDataAction); begin

Memo1.Lines.Add (' -> Post Error: ' + E.Message); end;

If you don't specify an action, as in the code above, the default daFail is used, and the exception reaches the global handler. Using daAbort stops the exception and can be used if your event handler already displays a message. Finally, if you have a way to determine the cause of the error and fix it, you can use the daRetry action.

NOTE The fourth error event, OnUpdateError, has a different structure and is used along with cached updates as the information is sent back from the local cache to the database. This handler is important for handling update conflicts among different users as described in the next example.

The example has also a DBGrid connected with the table. You can use the DBGrid to perform some illegal operations, such as adding a new record with the same key as an existing one or trying to execute illegal SQL queries. Pressing the four buttons on the left of the memo generate errors, as you can see in Figure 13.23.

FIGURE 13.23:

The third button of the DBError form generates an exception with 17 database errors!

Continue reading here: An Overview of Client Server Programming

Was this article helpful?