Subject Re: [IBO] Record not located to update
Author Geoff Worboys
> After discussions some months ago, I had set KeylinksAutodefine to
> true and was relying on that. However, just to prove it, in a one
> of the appelets I have set the keylinks explicitly and each table
> has got a unique field and an index that is unique.... which the
> indexname is set to.

KeyLinksAutoDefine will look for the PRIMARY KEY, not just any unique

> I am getting classic symptoms of wild pointer or
> uninitialised variables.
> Nothing makes sense to me except a serious bug in INterbase
> or uninitialised variable in IBO. But proving it is almost
> impossible as it works when debugging.

It certainly sounds like a strange problem. The main thing that I can
say is that I have not seen this problem with either IB5.6 or IB6.
What versions of everything are you using?

Some things to try...

* Check the triggers. Make sure you are not doing anything that may
change the key fields.

* What about UDFs? It is quite possible to get some very strange
problems as a result of UDFs.

* Write a script/import function to automatically generate data into
the table, to see if you can force the problem outside the normal form
environment (this should at least isolate Interbase as the possible

If none of these help, about the only way I can think of trying to
isolate would be to write a special handler to call BeforePost. Write
out the details (IsNull, AsString etc) of each field to a log file -
flushing the buffers to ensure the file saved before letting the post
proceed. That way, when an exception occurs you may be able to see if
there was anything odd about the data being written.

Cant think of anything much else. If you can write a program/database
that will demonstrate the problem you could send it to me privately
for testing.

Geoff Worboys
Telesis Computing