Hi Edson,
congratulation for figure out this issue and thanks for detailed
description and fixed procedure.
I will add a link to your last post in sequence-manager documentation
and update the procedure example for mssql.
regards,
Armin
Edson Carlos Ericksson Richter wrote:
Ok, this really
Ok, this really solved. Final procedure code (works on SQL2K and SQL2K5):
code
CREATE PROCEDURE OJB_NEXTVAL_PROC
@SEQ_NAME varchar(150)
AS
declare @MAX_KEY BIGINT
set nocount off
set @MAX_KEY = 0
UPDATE OJB_NEXTVAL_SEQ
SET @MAX_KEY = MAX_KEY = MAX_KEY + 1
WHERE SEQ_NAME = @SEQ_NAME
--
Hi!
I'm still with this problem.
Could someone say if SequenceManagers use default connection present at
current thread?
Or it's executed inside same transaction (I don't know if this implies
same connection)?
Thanks for any clarifications!
Richter
Edson Carlos Ericksson Richter
Ok, guys: now, I'm lost!
I changed auto-commit from 1 to 2, and now, appear OJB is trying to
insert records twice - on every new object I store, I get primary key
violation!
I'm using PB API with MsSQL Server 2000 SP4 and JDBC Driver for MS SQL
Server 2005 latest release. Someone knows what
Ok, guys. I think I discovered a piece of solution for this problem:
1) Database must be in Full recovery model
2) Every trigger must start with SET NOCOUNT ON and end with SET NOCOUNT OFF
3) The OBJ_NEXTVAL_PROC should start with SET NOCOUNT OFF
We are in testing fase right now, but appear the
Hi,
I'm not a database expert, so please forbear with me ;-)
Edson Carlos Ericksson Richter wrote:
Hi!
There is a very long time since my last problem with OJB - thank you
guys, it's awesome how good work was done until now.
In last month, I was migrating from Oracle to MS SQL, and changed
Armin Waibel escreveu:
Hi,
I'm not a database expert, so please forbear with me ;-)
Edson Carlos Ericksson Richter wrote:
Hi!
There is a very long time since my last problem with OJB - thank you
guys, it's awesome how good work was done until now.
In last month, I was migrating from Oracle
Hi!
There is a very long time since my last problem with OJB - thank you
guys, it's awesome how good work was done until now.
In last month, I was migrating from Oracle to MS SQL, and changed from
Sequence Manager Oracle native to Procedure based on MS SQL. Worked
great on tests, but when in