Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Datawindow got the wrong primary key(identity) after update(In sqlserver , with trigger)

2 posts in Objects Last posting was on 2010-02-28 05:22:11.0Z
zbguohua Posted on 2010-02-28 02:20:13.0Z
Sender: 1a03.4b88f558.1804289383@sybase.com
From: zbguohua
Newsgroups: sybase.public.powerbuilder.objects
Subject: Datawindow got the wrong primary key(identity) after update(In sqlserver , with trigger)
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4b89d2dd.370d.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 27 Feb 2010 18:20:13 -0800
X-Trace: forums-1-dub 1267323613 10.22.241.41 (27 Feb 2010 18:20:13 -0800)
X-Original-Trace: 27 Feb 2010 18:20:13 -0800, 10.22.241.41
Lines: 18
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9977
Article PK: 737105

In powerbuilder ,after dw_1.update(), datawindow got the
wrong primary key(identity)!

First, I suppose (in mssql server) there is a triggier named
"tr_insert" in table1 , which will insert a row in table2 ,
and these two tables (talbe1 and table2) have used indetity
key.

In powerbuilder, dw_1 used table1, when
dw_1.insertrow(0),after dw_1.update() ("table1.tr_insert"
have been triggered), dw_1 will gets the primary key
automatically , but ,it will gets the wrong identity number,
it will be the table2's indentity. (maybe it used @@identity
but not scope_identity())

Could I get a patch for pb11.5.1(4675) ?

zbguohua@hotmail.com


Bruce Armstrong Posted on 2010-02-28 05:22:11.0Z
From: Bruce Armstrong <NOCANSPAM_bruce.armstrong@yahoo.com>
Newsgroups: sybase.public.powerbuilder.objects
Subject: Re: Datawindow got the wrong primary key(identity) after update(In sqlserver , with trigger)
Reply-To: NOCANSPAM_bruce.armstrong@yahoo.com
Message-ID: <8cvjo5tt8oogl6dumukvoo5qcjpsabmcm1@4ax.com>
References: <4b89d2dd.370d.1681692777@sybase.com>
X-Newsreader: Forte Agent 5.00/32.1171
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Date: 27 Feb 2010 21:22:11 -0800
X-Trace: forums-1-dub 1267334531 10.22.241.152 (27 Feb 2010 21:22:11 -0800)
X-Original-Trace: 27 Feb 2010 21:22:11 -0800, vip152.sybase.com
Lines: 33
X-Authenticated-User: TeamSybase
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.objects:9978
Article PK: 737103

I addressed your question in one of the other sections you posted in.

On 27 Feb 2010 18:20:13 -0800, zbguohua wrote:

>In powerbuilder ,after dw_1.update(), datawindow got the
>wrong primary key(identity)!
>
>First, I suppose (in mssql server) there is a triggier named
>"tr_insert" in table1 , which will insert a row in table2 ,
>and these two tables (talbe1 and table2) have used indetity
>key.
>
>In powerbuilder, dw_1 used table1, when
>dw_1.insertrow(0),after dw_1.update() ("table1.tr_insert"
>have been triggered), dw_1 will gets the primary key
>automatically , but ,it will gets the wrong identity number,
>it will be the table2's indentity. (maybe it used @@identity
>but not scope_identity())
>
>Could I get a patch for pb11.5.1(4675) ?
>
>zbguohua@hotmail.com

-----------------------------------

My Web 2.0 Stuff

Blog: http://bruce.pbdjmagazine.com/
Facebook: http://www.facebook.com/people/Bruce-Armstrong/1600223798
Fotki: http://public.fotki.com/brucearmstrong/
LinkedIn: http://www.linkedin.com/in/bruceaarmstrong
Twitter: http://twitter.com/bruce_armstrong
YouTube: http://www.youtube.com/user/brucearmstrong