BM_Shift table error  Topic is solved

Discussions relating to Jiwa 7 plugin development, and the Jiwa 7 API.

BM_Shift table error

Postby Atronics » Wed Jul 29, 2015 5:33 pm

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.
Last edited by Atronics on Mon Aug 24, 2015 1:02 pm, edited 1 time in total.
Atronics
Frequent Contributor
Frequent Contributor
 
Posts: 119
Joined: Fri Feb 29, 2008 4:40 pm
Topics Solved: 10

Re: BM_Shift table error  Topic is solved

Postby Scott.Pearce » Tue Aug 18, 2015 3:25 pm

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).
Scott Pearce
Senior Analyst/Programmer
Jiwa Financials
User avatar
Scott.Pearce
Senpai
Senpai
 
Posts: 765
Joined: Tue Feb 12, 2008 11:27 am
Location: New South Wales, Australia
Topics Solved: 230

Re: BM_Shift table error

Postby Atronics » Tue Aug 18, 2015 3:51 pm

Thanks, Scott.
Atronics
Frequent Contributor
Frequent Contributor
 
Posts: 119
Joined: Fri Feb 29, 2008 4:40 pm
Topics Solved: 10


Return to Technical and or Programming

Who is online

Users browsing this forum: No registered users and 1 guest