Page 1 of 1

BM_Shift table error

PostPosted: Wed Jul 29, 2015 5:33 pm
by Atronics
Somehow the default value in the BM_Shift table has been deleted. The Manufacturing Configuration option returns an error and I am unable to use it to recreate the default value. SQL also return an error when I attempt to import the default value from the demo data, as does the following insert command.

Insert into BM_Shift (RecID, IN_LogicalID,Name,Description,IsEnabled,LastSavedDateTime,RowHash,IsDefault)
Values (
dbo.fnNewJiwaID(newid()),
'ZZZZZZZZZZ0000000000',
'Default',
'Default Shift',
1,
dbo.fnJiwaDateTime(GetDate(),
'0x0000000000000849',
1)

Could you let me know how to fix this, please.

Re: BM_Shift table error  Topic is solved

PostPosted: Tue Aug 18, 2015 3:25 pm
by Scott.Pearce
Ah.

The trick is the RowHash column. The RowHash columns appearing around the place in Jiwa now are used for concurrency control (instead of LastSavedDateTime). These columns are of type timestamp - the special thing about timestamp is that you never insert or update a column of such a type; it's handled for you by the SQL database engine itself.

To that end, you should omit the column "RowHash" from your named insert (and of course omit the value you are supplying).

Re: BM_Shift table error

PostPosted: Tue Aug 18, 2015 3:51 pm
by Atronics
Thanks, Scott.