Subject Data source and auto insert Help
Author Dave Bullar
I am feeling particularly dim!
I have a table with fields Namenum integer, Surname varchar(20), Firstname varchar(12)
It is a newly created, empty, table.
I have a form with ib_edits to get the firstname and surname.
I have an IB_query with
sql 'select * from tempnames where namenum = :nn for update'

On form show I have
ib_query1.parambyname('nn').asinteger := 1 := true;

this is linked to the ib_edits with an Ib_datasource with autoedit set true and auto insert set true.

Now there is no records anyway so I presume 'auto insert' applies,
because I can enter the names and see them appearing in an IB_grid which I have also coupled to the datasource just to keep an eye on things.

But I also want to put the 'namenum' in (which is the primary key).

If I say Namenum := 3 say then I get the error message 'Namenum is Readonly'
Ok so it needs to be set into edit state. So I say ib_query1.edit.
Now I get the error message 'Cannot edit current record'.


[Non-text portions of this message have been removed]