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)!

2 posts in General Discussion (Chinese) Last posting was on 2010-03-01 08:13:11.0Z
zbguohua Posted on 2010-02-27 11:06:09.0Z
Sender: 1a03.4b88f558.1804289383@sybase.com
From: zbguohua@hotmail.com
Newsgroups: sybase.public.chinese.powerbuilder.general
Subject: datawindow got the wrong primary key(identity)!
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4b88fca1.1ae8.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 27 Feb 2010 03:06:09 -0800
X-Trace: forums-1-dub 1267268769 10.22.241.41 (27 Feb 2010 03:06:09 -0800)
X-Original-Trace: 27 Feb 2010 03:06:09 -0800, 10.22.241.41
Lines: 36
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.chinese.powerbuilder.general:509
Article PK: 104532

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

dw&#33719;&#24471;&#38169;&#35823;&#30340;&#20027;&#38190;&#65288;
identity&#22411;&#65289;&#65306;&#22914;&#26524;
dw_1&#20351;&#29992;&#30340; table1
&#20351;&#29992;&#20102;identity&#20570;&#20027;&#38190;,
&#24403;dw_1.insert(), dw_1.update()&#20043;&#21518;,
dw_1&#33258;&#21160;&#24471;&#21040;&#35813;&#20027;&#38190;&#12290;
&#38382;&#39064;&#26159;&#22914;&#26524;table1&#20013;&#30340;
&#35302;&#21457;&#22120;&#22312;
&#21478;&#19968;&#24352;&#34920;&#65288;table2&#65289;&#20013;
&#25554;&#20837;&#20102;&#26032;&#34892;&#65292;&#24182;&#19988;
table2&#20063;&#20351;&#29992;identity&#20570;&#20027;&#38190;
&#65292;
&#37027;dw&#33719;&#24471;&#30340;&#26159;table2&#30340;identity.
&#36825;&#20010;&#38169;&#35823;&#30456;&#24403;&#20005;&#37325;
&#12290;&#25110;&#35768;&#24212;&#35813;&#20351;&#29992;scope_identity()&#20989;
&#25968;&#26469;&#36820;&#22238;&#27491;&#30830;&#20027;&#38190;
&#20540;&#12290;


hgong Posted on 2010-03-01 08:13:11.0Z
Sender: e8f.4b8b7685.1804289383@sybase.com
From: hgong
Newsgroups: sybase.public.chinese.powerbuilder.general
Subject: Re: datawindow got the wrong primary key(identity)!
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4b8b7717.e95.1681692777@sybase.com>
References: <4b88fca1.1ae8.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 1 Mar 2010 00:13:11 -0800
X-Trace: forums-1-dub 1267431191 10.22.241.41 (1 Mar 2010 00:13:11 -0800)
X-Original-Trace: 1 Mar 2010 00:13:11 -0800, 10.22.241.41
Lines: 41
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.chinese.powerbuilder.general:510
Article PK: 104534


> 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
>
> dw&#33719;&#24471;&#38169;&#35823;&#30340;&#20027;&#38190;
> ;&#65288; identity&#22411;&#65289;&#65306;&#22914;&#26524;
> dw_1&#20351;&#29992;&#30340; table1
> &#20351;&#29992;&#20102;identity&#20570;&#20027;&#38190;,
> &#24403;dw_1.insert(), dw_1.update()&#20043;&#21518;,
> dw_1&#33258;&#21160;&#24471;&#21040;&#35813;&#20027;
> ;&#38190;&#12290; &#38382;&#39064;&#26159;&#22914;&#26524;
> ;table1&#20013;&#30340; &#35302;&#21457;&#22120;&#22312;
> &#21478;&#19968;&#24352;&#34920;&#65288;table2&#65289;
> ;&#20013; &#25554;&#20837;&#20102;&#26032;&#34892;&#65292;
> ;&#24182;&#19988; table2&#20063;&#20351;&#29992;
> ;identity&#20570;&#20027;&#38190; &#65292;
> &#37027;dw&#33719;&#24471;&#30340;&#26159;table2&#30340;
> ;identity.
&#36825;&#20010;&#38169;&#35823;&#30456;&#24403;
> ;&#20005;&#37325; &#12290;&#25110;&#35768;&#24212;&#35813;
> ;&#20351;&#29992;scope_identity()&#20989; &#25968;&#26469;
> ;&#36820;&#22238;&#27491;&#30830;&#20027;&#38190; &#20540;
> ;&#12290;

Can you provide a case(including the table creating script
and pb code) to reproduce the issue?