Subject Re: [IBO] Virtual data in IBO?

That is what I'm doing! The problem is that I don't have a unique key
field (as, in some cases, the data, i.e. the zeroes, doesn't actually
exist in the database).

I need a unique field passed back from the select statement, and I
can generate a value if the data doesn't exist, but as their isn't
really a corresponding record in the database, I obviously get error
messages when I try to edit the values (as you can't edit what isn't

I'm writing a program which shows three figures for each month, over
a twelve month period. Between zero and twelve of these months might
actually have data stored in the database - the rest just don't
exist. What I need is a method of filling a grid with zeros when the
figures don't exist, and being able to alter these zeroes to any
other value, which then DOES become a record in the database. So, in
effect I'm inserting, rather than editing, but it doesn't look like
that to the user.

So - is there any way to avoid the keylinks property? I could pass
back a null, or zeros as the key, then generate a real unique value
when I do the insert/edit stored procedure, but I can't get this to
work (I get an error about being unable to generate a cursor without
a key, or something similar).

Sorry I can't elaborate more - it's quite a difficult one to describe
properly. I know I could simply populate the table with zeroes, but
I'm a bit of a perfectionist!


--- In IBObjects@y..., "Jason Wharton" <jwharton@i...> wrote:
> Use stored procedures for all the operations. Just plug in
additional stored
> procedures to handle insert, update and delete in the InsertSQL,
EditSQL and
> DeleteSQL properties.
> HTH,
> Jason Wharton
> CPS - Mesa AZ
> ----- Original Message -----
> From: <Gary@S...>
> To: <IBObjects@y...>
> Sent: Wednesday, May 09, 2001 8:34 AM
> Subject: [IBO] Virtual data in IBO?
> > I am trying to write an IBObjects based program which displays a
> > of 12 figures by date from a database table, or replaces them with
> > zeros if there is no entry corresponding to that date. This works
> > fine as far as displaying the information in a grid is concerned.
> > problem arises when it comes to editing/inserting/deleting from
> > database table, as I cannot properly define a unique field for the
> > keylinks (because some of the data is 'virtual', if you see what I
> > mean). If there was any way I could ignore the keylink setting, I
> > could write a stored procedure which either 'inserted'
or 'updated'
> > to the table depending on whether the data really existed in the
> > table.
> >
> > Is there any way around this problem, other than creating a link
> > another table which store the month and year, etc. to generate a
> > unique key? This seems such a messy option for a component set as
> > elegant as IBObjects.
> >
> > The other option I can see is to populate the database with
> > unneccesary zeroes, which also seems to be un-elegant.
> >
> > Help me! I've been tinkering with this problem for ages, and I
> > to get on to more interesting parts of the program!
> >
> >
> > Bamber.
> >
> >
> >
> >
> > Your use of Yahoo! Groups is subject to
> >
> >