I have a "simple" grid I want to create to edit a table that has four key fields. This grid should work similar to the Chart of Accounts Maintenance. I can insert and delete as many rows as I want. I can edit and save the first row. Any other row I can edit, but when I save I get the message : System Message 6900 - Another process has updated the Rate Table table. The system will automatically Cancel your changes.
Here's the Form1 code:
Call ApplInit()
Call SetAddr(LEVEL0, "bxPTIRate", bxPTIRate, nxPTIRate)
Call SqlCursorEx(CSR_xPTIRate, LEVEL0, "CSR_xPTIRate", "xPTIRate", "xPTIRate")
Call ScreenInit()
mh_xPTIRate = DetailSetup(CSR_xPTIRate, SafGrid1, PNULL, bxPTIRate, PNULL, PNULL, PNULL) ------ The sql that created the table:
Create Table xPTIRate ( CpnyId char (10) not null, InsBalShtAcct char (10) not null, InsExpAcct char (10) not null, InsRate float not null, LaborAcct char (10) not null, NoteId int not null, OtherBalShtAcct char (10) not null, OtherExpAcct char (10) not null, OtherRate float not null, State char (10) not null, TaxBalShtAcct char (10) not null, TaxExpAcct char (10) not null, TaxRate float not null, TaxTable char (10) not null, User1 char (30) not null, User2 char (30) not null, User3 float not null, User4 float not null, User5 char (10) not null, User6 char (10) not null, User7 smalldatetime not null, User8 smalldatetime not null, VacBalShtAcct char (10) not null, VacExpAcct char (10) not null, VacRate float not null, WCBalShtAcct char (10) not null, WCExpAcct char (10) not null, WCRate float not null, tstamp Timestamp not null, constraint xPTIRate0 primary key (CpnyId, State, TaxTable, LaborAcct)) -----
The Update1 Levels is set to : RateTable;D
-----
All the fields on Form1 are set to Level 0, including the primary key fields. Setting the four key fields to 0,k does not help.
-----
DBNav on SafGrid1: "xPTIRate_p1",
-----
xPTIRate_p1 Procedure:
ALTER
proc [dbo].[xPTIRate_p1] as
select
* from xPTIRate
order
by CpnyId, State, TaxTable, LaborAcct
-----
I have successfully created detail grids using autonumber for the last primary key. I thought this would be easier ....
*This post is locked for comments