Subject Re: [IBO] Virtual data in IBO?
Author Geoff Worboys
> That sounds very similar to my situation. I have a stored
> procedure in the EditSQL which needs a unique key to be
> able to edit (or insert/delete).
<...>
> What are you using in the 'keylinks' property? My program
> would appear not to need anything here, but I get the
> message 'cannot open cursor without key data' when I try
> to edit the figures in the grid.

The database where this form is stored is busy rebuilding at the
moment (and will be for a few hours), so I cannot double check. But
from memory I have keylinks blank and KeyLinksAutoDefine set to
false - and FetchWholeRows = true.

The stored procedure simply expects a bunch of parameters, what you do
with those parameters internally to generate an edit/insert is upto
you - even generating the required values.

In my situation, the select stored procedure actually returns values
which will be used by the EditSQL (when passed as parameters) as the
key data for the edit/insert/delete processing inside the edit stored
procedure. Even so, I do not try to tell IBO that these are keylinks,
since IBO cannot use them in that manner.

By executing a RefreshAll after posting any row, you cause IBO to
reread all rows in the grid - getting to see what the EditSQL process
changed. Normally IBO would try to refresh only a single row (using
the KeyLinks) but it cannot do this with a stored procedure (yet).
Obviously this need to RefreshAll means that this approach is only
practical for a small result set.


HTH

Geoff Worboys
Telesis Computing