Row changed between Retrieve & Update #2

We are currently migrating our app from SYbase to MS-SQL
Server 2008. We are using PB11.5 & connecting to MS-SQL
Server using the PB Native Driver (SQLNCLI10).

In one of the windows we are getting "Row changed between
Retrieve & Update". Can anybody give a clue why this might
be happening.

The window works perfectly in SybaseBUT is failing in
MS_SQL.I know the the general reason for getting this msg.
BUT what we are surprised is that this works great in Sybase
& for some reason fails in MS_SQL Server. I know for sure
that I am the only one accessing this data so there is no
reason for getting the "ROW CHANGED.." error. The DW has of
course 'key & updateable columns' & if we change to 'key
columns' this might work in MS-SQL.
BUT want to know what could be the cause for this to fail in
MS-SQL. Has anybody else experienced this when migrating
from Sybase to MS-SQL Server2008
Thnx
Anil
0
anil
12/3/2010 3:47:51 AM
sybase.powerbuilder.datawindow 28057 articles. 4 followers. Follow

11 Replies
861 Views

Similar Articles

[PageSpeed] 3

What's the datatype of the key column?   Timestamp columns operate 
differently in Sybase (which is a company, not a DBMS - we have 5 different 
DBMS products...) than in MS-SQL.

Paul Horan[Sybase]
http://paulhoran.ulitzer.com

<anil> wrote in message news:4cf86867.775f.1681692777@sybase.com...
> We are currently migrating our app from SYbase to MS-SQL
> Server 2008. We are using PB11.5 & connecting to MS-SQL
> Server using the PB Native Driver (SQLNCLI10).
>
> In one of the windows we are getting "Row changed between
> Retrieve & Update". Can anybody give a clue why this might
> be happening.
>
> The window works perfectly in SybaseBUT is failing in
> MS_SQL.I know the the general reason for getting this msg.
> BUT what we are surprised is that this works great in Sybase
> & for some reason fails in MS_SQL Server. I know for sure
> that I am the only one accessing this data so there is no
> reason for getting the "ROW CHANGED.." error. The DW has of
> course 'key & updateable columns' & if we change to 'key
> columns' this might work in MS-SQL.
> BUT want to know what could be the cause for this to fail in
> MS-SQL. Has anybody else experienced this when migrating
> from Sybase to MS-SQL Server2008
> Thnx
> Anil 


0
Paul
12/3/2010 2:37:51 PM
Hi Anil;

  Sorry to hear that you have had to downgrade your DBMS!  :-))))

I suspect that changing the DW update to Key only will be the ticket. I 
think the problem might be due to checking the updatable columns where maybe 
the DBA has added a trigger that is updating something, changed a data type 
thus the columns behaviour, etc.

HTH

Regards ... Chris
President: OSUG / STD Inc.
Blog: http://chrispollach.blogspot.com
PBDJ: http://chrispollach.sys-con.com
SourceForge: http://sourceforge.net/projects/stdfndclass

"anil" wrote in message news:4cf86867.775f.1681692777@sybase.com...

We are currently migrating our app from SYbase to MS-SQL
Server 2008. We are using PB11.5 & connecting to MS-SQL
Server using the PB Native Driver (SQLNCLI10).

In one of the windows we are getting "Row changed between
Retrieve & Update". Can anybody give a clue why this might
be happening.

The window works perfectly in SybaseBUT is failing in
MS_SQL.I know the the general reason for getting this msg.
BUT what we are surprised is that this works great in Sybase
& for some reason fails in MS_SQL Server. I know for sure
that I am the only one accessing this data so there is no
reason for getting the "ROW CHANGED.." error. The DW has of
course 'key & updateable columns' & if we change to 'key
columns' this might work in MS-SQL.
BUT want to know what could be the cause for this to fail in
MS-SQL. Has anybody else experienced this when migrating
from Sybase to MS-SQL Server2008
Thnx
Anil 

0
Chris
12/3/2010 2:51:54 PM
In addition to what Chris said you may want to look at the
RecheckRows dbparm.


> Hi Anil;
>
>   Sorry to hear that you have had to downgrade your DBMS!
> :-))))
>
> I suspect that changing the DW update to Key only will be
> the ticket. I  think the problem might be due to checking
> the updatable columns where maybe  the DBA has added a
> trigger that is updating something, changed a data type
> thus the columns behaviour, etc.
>
> HTH
>
> Regards ... Chris
> President: OSUG / STD Inc.
> Blog: http://chrispollach.blogspot.com
> PBDJ: http://chrispollach.sys-con.com
> SourceForge: http://sourceforge.net/projects/stdfndclass
>
> "anil" wrote in message
> news:4cf86867.775f.1681692777@sybase.com...
>
> We are currently migrating our app from SYbase to MS-SQL
> Server 2008. We are using PB11.5 & connecting to MS-SQL
> Server using the PB Native Driver (SQLNCLI10).
>
> In one of the windows we are getting "Row changed between
> Retrieve & Update". Can anybody give a clue why this might
> be happening.
>
> The window works perfectly in SybaseBUT is failing in
> MS_SQL.I know the the general reason for getting this msg.
> BUT what we are surprised is that this works great in
> Sybase & for some reason fails in MS_SQL Server. I know
> for sure that I am the only one accessing this data so
> there is no reason for getting the "ROW CHANGED.." error.
> The DW has of course 'key & updateable columns' & if we
> change to 'key columns' this might work in MS-SQL.
> BUT want to know what could be the cause for this to fail
> in MS-SQL. Has anybody else experienced this when
> migrating from Sybase to MS-SQL Server2008
> Thnx
> Anil
>
0
Ted
12/3/2010 3:09:11 PM
Hello Chris
Yes. Its unfortunate that we are forced to downgrade. Been
working in Sybase for the last 15 years. Blame it on Mgmt.
:(

I was researching on this issue &found a link where Bruce
Armstrong had suggested to put SET NOCOUNT ON in the
trigger. Adding this, my data is saving & I am not getting
any error. But I am not understanding how NOCOUNT ON can
resolve this problem. I am just worried if this is the
correct solution OR this is just masking the error.
How can SET NOCOUNT ON mask this error & is this the correct
solution?
Anil

> Hi Anil;
>
>   Sorry to hear that you have had to downgrade your DBMS!
> :-))))
>
> I suspect that changing the DW update to Key only will be
> the ticket. I  think the problem might be due to checking
> the updatable columns where maybe  the DBA has added a
> trigger that is updating something, changed a data type
> thus the columns behaviour, etc.
>
> HTH
>
> Regards ... Chris
> President: OSUG / STD Inc.
> Blog: http://chrispollach.blogspot.com
> PBDJ: http://chrispollach.sys-con.com
> SourceForge: http://sourceforge.net/projects/stdfndclass
>
> "anil" wrote in message
> news:4cf86867.775f.1681692777@sybase.com...
>
> We are currently migrating our app from SYbase to MS-SQL
> Server 2008. We are using PB11.5 & connecting to MS-SQL
> Server using the PB Native Driver (SQLNCLI10).
>
> In one of the windows we are getting "Row changed between
> Retrieve & Update". Can anybody give a clue why this might
> be happening.
>
> The window works perfectly in SybaseBUT is failing in
> MS_SQL.I know the the general reason for getting this msg.
> BUT what we are surprised is that this works great in
> Sybase & for some reason fails in MS_SQL Server. I know
> for sure that I am the only one accessing this data so
> there is no reason for getting the "ROW CHANGED.." error.
> The DW has of course 'key & updateable columns' & if we
> change to 'key columns' this might work in MS-SQL.
> BUT want to know what could be the cause for this to fail
> in MS-SQL. Has anybody else experienced this when
> migrating from Sybase to MS-SQL Server2008
> Thnx
> Anil
>
0
Anil
12/3/2010 10:46:19 PM
Hi Anil;

   Pretty much the same here in Canada's capital. Most ASE shops have now 
switched to SS due to management pressure.  :-(


Regards ... Chris
President: OSUG / STD Inc.
Blog: http://chrispollach.blogspot.com
PBDJ: http://chrispollach.sys-con.com
SourceForge: http://sourceforge.net/projects/stdfndclass

"Anil" wrote in message news:4cf9733b.2473.1681692777@sybase.com...

Hello Chris
Yes. Its unfortunate that we are forced to downgrade. Been
working in Sybase for the last 15 years. Blame it on Mgmt.
:(

I was researching on this issue &found a link where Bruce
Armstrong had suggested to put SET NOCOUNT ON in the
trigger. Adding this, my data is saving & I am not getting
any error. But I am not understanding how NOCOUNT ON can
resolve this problem. I am just worried if this is the
correct solution OR this is just masking the error.
How can SET NOCOUNT ON mask this error & is this the correct
solution?
Anil

> Hi Anil;
>
>   Sorry to hear that you have had to downgrade your DBMS!
> :-))))
>
> I suspect that changing the DW update to Key only will be
> the ticket. I  think the problem might be due to checking
> the updatable columns where maybe  the DBA has added a
> trigger that is updating something, changed a data type
> thus the columns behaviour, etc.
>
> HTH
>
> Regards ... Chris
> President: OSUG / STD Inc.
> Blog: http://chrispollach.blogspot.com
> PBDJ: http://chrispollach.sys-con.com
> SourceForge: http://sourceforge.net/projects/stdfndclass
>
> "anil" wrote in message
> news:4cf86867.775f.1681692777@sybase.com...
>
> We are currently migrating our app from SYbase to MS-SQL
> Server 2008. We are using PB11.5 & connecting to MS-SQL
> Server using the PB Native Driver (SQLNCLI10).
>
> In one of the windows we are getting "Row changed between
> Retrieve & Update". Can anybody give a clue why this might
> be happening.
>
> The window works perfectly in SybaseBUT is failing in
> MS_SQL.I know the the general reason for getting this msg.
> BUT what we are surprised is that this works great in
> Sybase & for some reason fails in MS_SQL Server. I know
> for sure that I am the only one accessing this data so
> there is no reason for getting the "ROW CHANGED.." error.
> The DW has of course 'key & updateable columns' & if we
> change to 'key columns' this might work in MS-SQL.
> BUT want to know what could be the cause for this to fail
> in MS-SQL. Has anybody else experienced this when
> migrating from Sybase to MS-SQL Server2008
> Thnx
> Anil
> 

0
Chris
12/4/2010 2:21:46 AM
Hi Chris,
I would partly blame this on Sybase too. We have been
migrating our app. for the last 2 months & with my 'limited'
experience of using ms-sql during this short period, I am
actually seeing some pretty strong reasons for taking a
stand on MS_SQL Server.

The sad thing is our mgmt were also seriously thinking of
replacing PB with C# BUT due to the huge size of our app.,
risk & the budget to convert to C#, we are now thinking of
having a mix of PB & C# wen we migrate to PB12.NET.
Eventually a day will come soon when our app. will be
replaced by C#. This will be the saddest day of my
professional life.

Anyway, Chris - Pl. advice as to how SET NOCOUNT ON  can fix
the issue.

Thnx
Anil
> Hi Anil;
>
>    Pretty much the same here in Canada's capital. Most ASE
> shops have now  switched to SS due to management pressure.
>  :-(
>
>
> Regards ... Chris
> President: OSUG / STD Inc.
> Blog: http://chrispollach.blogspot.com
> PBDJ: http://chrispollach.sys-con.com
> SourceForge: http://sourceforge.net/projects/stdfndclass
>
> "Anil" wrote in message
> news:4cf9733b.2473.1681692777@sybase.com...
>
> Hello Chris
> Yes. Its unfortunate that we are forced to downgrade. Been
> working in Sybase for the last 15 years. Blame it on Mgmt.
> :(
>
> I was researching on this issue &found a link where Bruce
> Armstrong had suggested to put SET NOCOUNT ON in the
> trigger. Adding this, my data is saving & I am not getting
> any error. But I am not understanding how NOCOUNT ON can
> resolve this problem. I am just worried if this is the
> correct solution OR this is just masking the error.
> How can SET NOCOUNT ON mask this error & is this the
> correct solution?
> Anil
>
> > Hi Anil;
> >
> >   Sorry to hear that you have had to downgrade your
> > DBMS! :-))))
> >
> > I suspect that changing the DW update to Key only will
> > be the ticket. I  think the problem might be due to
> > checking the updatable columns where maybe  the DBA has
> > added a trigger that is updating something, changed a
> > data type thus the columns behaviour, etc.
> >
> > HTH
> >
> > Regards ... Chris
> > President: OSUG / STD Inc.
> > Blog: http://chrispollach.blogspot.com
> > PBDJ: http://chrispollach.sys-con.com
> > SourceForge: http://sourceforge.net/projects/stdfndclass
> >
> > "anil" wrote in message
> > news:4cf86867.775f.1681692777@sybase.com...
> >
> > We are currently migrating our app from SYbase to MS-SQL
> > Server 2008. We are using PB11.5 & connecting to MS-SQL
> > Server using the PB Native Driver (SQLNCLI10).
> >
> > In one of the windows we are getting "Row changed
> > between Retrieve & Update". Can anybody give a clue why
> > this might be happening.
> >
> > The window works perfectly in SybaseBUT is failing in
> > MS_SQL.I know the the general reason for getting this
> > msg. BUT what we are surprised is that this works great
> > in Sybase & for some reason fails in MS_SQL Server. I
> > know for sure that I am the only one accessing this data
> > so there is no reason for getting the "ROW CHANGED.."
> > error. The DW has of course 'key & updateable columns' &
> > if we change to 'key columns' this might work in MS-SQL.
> > BUT want to know what could be the cause for this to
> > fail in MS-SQL. Has anybody else experienced this when
> > migrating from Sybase to MS-SQL Server2008
> > Thnx
> > Anil
> >
>
0
Anil
12/4/2010 1:52:41 PM
The datatype is tinyint.
The sybase product is the DBMS ASE 12.5.2
Anil

> What's the datatype of the key column?   Timestamp columns
> operate  differently in Sybase (which is a company, not a
> DBMS - we have 5 different  DBMS products...) than in
> MS-SQL.
>
> Paul Horan[Sybase]
> http://paulhoran.ulitzer.com
>
> <anil> wrote in message
> > news:4cf86867.775f.1681692777@sybase.com... We are
> > currently migrating our app from SYbase to MS-SQL Server
> > 2008. We are using PB11.5 & connecting to MS-SQL Server
> using the PB Native Driver (SQLNCLI10). >
> > In one of the windows we are getting "Row changed
> > between Retrieve & Update". Can anybody give a clue why
> > this might be happening.
> >
> > The window works perfectly in SybaseBUT is failing in
> > MS_SQL.I know the the general reason for getting this
> > msg. BUT what we are surprised is that this works great
> > in Sybase & for some reason fails in MS_SQL Server. I
> > know for sure that I am the only one accessing this data
> > so there is no reason for getting the "ROW CHANGED.."
> > error. The DW has of course 'key & updateable columns' &
> > if we change to 'key columns' this might work in MS-SQL.
> > BUT want to know what could be the cause for this to
> > fail in MS-SQL. Has anybody else experienced this when
> > migrating from Sybase to MS-SQL Server2008
> > Thnx
> > Anil
>
>
0
anil
12/4/2010 2:20:32 PM
This worked too. Thanks a lot.
So which is a better option. RecheckRows or setting NOCOUNT
ON in the trigger?
I have'nt understood how  NOCOUNT ON will resolve the issue.
Pl. advice about this.
THnx
Anil

> In addition to what Chris said you may want to look at the
> RecheckRows dbparm.
>
>
> > Hi Anil;
> >
> >   Sorry to hear that you have had to downgrade your
> > DBMS! :-))))
> >
> > I suspect that changing the DW update to Key only will
> > be the ticket. I  think the problem might be due to
> > checking the updatable columns where maybe  the DBA has
> > added a trigger that is updating something, changed a
> > data type thus the columns behaviour, etc.
> >
> > HTH
> >
> > Regards ... Chris
> > President: OSUG / STD Inc.
> > Blog: http://chrispollach.blogspot.com
> > PBDJ: http://chrispollach.sys-con.com
> > SourceForge: http://sourceforge.net/projects/stdfndclass
> >
> > "anil" wrote in message
> > news:4cf86867.775f.1681692777@sybase.com...
> >
> > We are currently migrating our app from SYbase to MS-SQL
> > Server 2008. We are using PB11.5 & connecting to MS-SQL
> > Server using the PB Native Driver (SQLNCLI10).
> >
> > In one of the windows we are getting "Row changed
> > between Retrieve & Update". Can anybody give a clue why
> > this might be happening.
> >
> > The window works perfectly in SybaseBUT is failing in
> > MS_SQL.I know the the general reason for getting this
> > msg. BUT what we are surprised is that this works great
> > in Sybase & for some reason fails in MS_SQL Server. I
> > know for sure that I am the only one accessing this data
> > so there is no reason for getting the "ROW CHANGED.."
> > error. The DW has of course 'key & updateable columns' &
> > if we change to 'key columns' this might work in MS-SQL.
> > BUT want to know what could be the cause for this to
> > fail in MS-SQL. Has anybody else experienced this when
> > migrating from Sybase to MS-SQL Server2008
> > Thnx
> > Anil
> >
0
aNIL
12/4/2010 2:52:16 PM
Yes, its pretty much the same direction here in the Canadian federal 
government.   :-(

I think it was Ted that was talking about the Set options.


"Anil" wrote in message news:4cfa47a9.43b4.1681692777@sybase.com...

Hi Chris,
I would partly blame this on Sybase too. We have been
migrating our app. for the last 2 months & with my 'limited'
experience of using ms-sql during this short period, I am
actually seeing some pretty strong reasons for taking a
stand on MS_SQL Server.

The sad thing is our mgmt were also seriously thinking of
replacing PB with C# BUT due to the huge size of our app.,
risk & the budget to convert to C#, we are now thinking of
having a mix of PB & C# wen we migrate to PB12.NET.
Eventually a day will come soon when our app. will be
replaced by C#. This will be the saddest day of my
professional life.

Anyway, Chris - Pl. advice as to how SET NOCOUNT ON  can fix
the issue.

Thnx
Anil
> Hi Anil;
>
>    Pretty much the same here in Canada's capital. Most ASE
> shops have now  switched to SS due to management pressure.
>  :-(
>
>
> Regards ... Chris
> President: OSUG / STD Inc.
> Blog: http://chrispollach.blogspot.com
> PBDJ: http://chrispollach.sys-con.com
> SourceForge: http://sourceforge.net/projects/stdfndclass
>
> "Anil" wrote in message
> news:4cf9733b.2473.1681692777@sybase.com...
>
> Hello Chris
> Yes. Its unfortunate that we are forced to downgrade. Been
> working in Sybase for the last 15 years. Blame it on Mgmt.
> :(
>
> I was researching on this issue &found a link where Bruce
> Armstrong had suggested to put SET NOCOUNT ON in the
> trigger. Adding this, my data is saving & I am not getting
> any error. But I am not understanding how NOCOUNT ON can
> resolve this problem. I am just worried if this is the
> correct solution OR this is just masking the error.
> How can SET NOCOUNT ON mask this error & is this the
> correct solution?
> Anil
>
> > Hi Anil;
> >
> >   Sorry to hear that you have had to downgrade your
> > DBMS! :-))))
> >
> > I suspect that changing the DW update to Key only will
> > be the ticket. I  think the problem might be due to
> > checking the updatable columns where maybe  the DBA has
> > added a trigger that is updating something, changed a
> > data type thus the columns behaviour, etc.
> >
> > HTH
> >
> > Regards ... Chris
> > President: OSUG / STD Inc.
> > Blog: http://chrispollach.blogspot.com
> > PBDJ: http://chrispollach.sys-con.com
> > SourceForge: http://sourceforge.net/projects/stdfndclass
> >
> > "anil" wrote in message
> > news:4cf86867.775f.1681692777@sybase.com...
> >
> > We are currently migrating our app from SYbase to MS-SQL
> > Server 2008. We are using PB11.5 & connecting to MS-SQL
> > Server using the PB Native Driver (SQLNCLI10).
> >
> > In one of the windows we are getting "Row changed
> > between Retrieve & Update". Can anybody give a clue why
> > this might be happening.
> >
> > The window works perfectly in SybaseBUT is failing in
> > MS_SQL.I know the the general reason for getting this
> > msg. BUT what we are surprised is that this works great
> > in Sybase & for some reason fails in MS_SQL Server. I
> > know for sure that I am the only one accessing this data
> > so there is no reason for getting the "ROW CHANGED.."
> > error. The DW has of course 'key & updateable columns' &
> > if we change to 'key columns' this might work in MS-SQL.
> > BUT want to know what could be the cause for this to
> > fail in MS-SQL. Has anybody else experienced this when
> > migrating from Sybase to MS-SQL Server2008
> > Thnx
> > Anil
> >
> 

0
Chris
12/6/2010 3:22:24 PM
I mentioned to check the RecheckRows dbparm in the
Powerbuilder help.

Rechecks the number of rows affected by an INSERT, UPDATE,
or DELETE command and returns it in the SQLNRows property of
the Transaction object.

In Microsoft SQL server, if a table has an insert, update,
or delete trigger, the number of affected rows returned to
the SQLNRows property of the Transaction object after an
INSERT, UPDATE, or DELETE command depends on the driver...

> Yes, its pretty much the same direction here in the
> Canadian federal  government.   :-(
>
> I think it was Ted that was talking about the Set options.
>
>
> "Anil" wrote in message
> news:4cfa47a9.43b4.1681692777@sybase.com...
>
> Hi Chris,
> I would partly blame this on Sybase too. We have been
> migrating our app. for the last 2 months & with my
> 'limited' experience of using ms-sql during this short
> period, I am actually seeing some pretty strong reasons
> for taking a stand on MS_SQL Server.
>
> The sad thing is our mgmt were also seriously thinking of
> replacing PB with C# BUT due to the huge size of our app.,
> risk & the budget to convert to C#, we are now thinking of
> having a mix of PB & C# wen we migrate to PB12.NET.
> Eventually a day will come soon when our app. will be
> replaced by C#. This will be the saddest day of my
> professional life.
>
> Anyway, Chris - Pl. advice as to how SET NOCOUNT ON  can
> fix the issue.
>
> Thnx
> Anil
> > Hi Anil;
> >
> >    Pretty much the same here in Canada's capital. Most
> > ASE shops have now  switched to SS due to management
> >  pressure. :-(
> >
> >
> > Regards ... Chris
> > President: OSUG / STD Inc.
> > Blog: http://chrispollach.blogspot.com
> > PBDJ: http://chrispollach.sys-con.com
> > SourceForge: http://sourceforge.net/projects/stdfndclass
> >
> > "Anil" wrote in message
> > news:4cf9733b.2473.1681692777@sybase.com...
> >
> > Hello Chris
> > Yes. Its unfortunate that we are forced to downgrade.
> > Been working in Sybase for the last 15 years. Blame it
> > on Mgmt. :(
> >
> > I was researching on this issue &found a link where
> > Bruce Armstrong had suggested to put SET NOCOUNT ON in
> > the trigger. Adding this, my data is saving & I am not
> > getting any error. But I am not understanding how
> > NOCOUNT ON can resolve this problem. I am just worried
> > if this is the correct solution OR this is just masking
> > the error. How can SET NOCOUNT ON mask this error & is
> > this the correct solution?
> > Anil
> >
> > > Hi Anil;
> > >
> > >   Sorry to hear that you have had to downgrade your
> > > DBMS! :-))))
> > >
> > > I suspect that changing the DW update to Key only will
> > > be the ticket. I  think the problem might be due to
> > > checking the updatable columns where maybe  the DBA
> > > has added a trigger that is updating something,
> > > changed a data type thus the columns behaviour, etc.
> > >
> > > HTH
> > >
> > > Regards ... Chris
> > > President: OSUG / STD Inc.
> > > Blog: http://chrispollach.blogspot.com
> > > PBDJ: http://chrispollach.sys-con.com
> > > SourceForge:
> > http://sourceforge.net/projects/stdfndclass >
> > > "anil" wrote in message
> > > news:4cf86867.775f.1681692777@sybase.com...
> > >
> > > We are currently migrating our app from SYbase to
> > > MS-SQL Server 2008. We are using PB11.5 & connecting
> > > to MS-SQL Server using the PB Native Driver
> > (SQLNCLI10). >
> > > In one of the windows we are getting "Row changed
> > > between Retrieve & Update". Can anybody give a clue
> > > why this might be happening.
> > >
> > > The window works perfectly in SybaseBUT is failing in
> > > MS_SQL.I know the the general reason for getting this
> > > msg. BUT what we are surprised is that this works
> > > great in Sybase & for some reason fails in MS_SQL
> > > Server. I know for sure that I am the only one
> > > accessing this data so there is no reason for getting
> > > the "ROW CHANGED.." error. The DW has of course 'key &
> > > updateable columns' & if we change to 'key columns'
> > > this might work in MS-SQL. BUT want to know what could
> > > be the cause for this to fail in MS-SQL. Has anybody
> > > else experienced this when migrating from Sybase to
> > > MS-SQL Server2008 Thnx
> > > Anil
> > >
> >
>
0
Ted
12/6/2010 6:00:47 PM
Does your data use char types?  If so, you might get hit by trimming of 
traling spaces.  From the online help for the trimspaces dbparm:

>>By default, PowerBuilder trims spaces from the following datatypes: Char, 
>>Char for Bit Data, VarChar, and VarChar for Bit Data.
ODBC database interface    Some ODBC drivers, such as ASA, trim trailing 
spaces before the data reaches the fetch buffer—even when TrimSpaces is set 
to 0.
If your DBMS makes a distinction between Char data with trailing spaces and 
Char data without trailing spaces when evaluating a WHERE clause expression, 
you might receive the message Row changed between retrieve and update when 
your DataWindow update properties are set to "Key and updateable columns." 
To prevent this, change your DataWindow update properties. In embedded SQL, 
you can check Sqlca.Sqlnrows after each update to determine if the update 
took place. Avoid using Char data columns in the WHERE clause of an UPDATE 
or DELETE statement when TrimSpaces=1.<<

-- Terry Dykstra (TeamSybase)
http://powerbuilder.codeXchange.sybase.com/
http://casexpress.sybase.com
http://my.isug.com/cgi-bin/1/c/submit_enhancement

"Ted Zimmerman [Sybase]" wrote in message 
news:4cfd24cf.206b.1681692777@sybase.com...

I mentioned to check the RecheckRows dbparm in the
Powerbuilder help.

Rechecks the number of rows affected by an INSERT, UPDATE,
or DELETE command and returns it in the SQLNRows property of
the Transaction object.

In Microsoft SQL server, if a table has an insert, update,
or delete trigger, the number of affected rows returned to
the SQLNRows property of the Transaction object after an
INSERT, UPDATE, or DELETE command depends on the driver...

> Yes, its pretty much the same direction here in the
> Canadian federal  government.   :-(
>
> I think it was Ted that was talking about the Set options.
>
>
> "Anil" wrote in message
> news:4cfa47a9.43b4.1681692777@sybase.com...
>
> Hi Chris,
> I would partly blame this on Sybase too. We have been
> migrating our app. for the last 2 months & with my
> 'limited' experience of using ms-sql during this short
> period, I am actually seeing some pretty strong reasons
> for taking a stand on MS_SQL Server.
>
> The sad thing is our mgmt were also seriously thinking of
> replacing PB with C# BUT due to the huge size of our app.,
> risk & the budget to convert to C#, we are now thinking of
> having a mix of PB & C# wen we migrate to PB12.NET.
> Eventually a day will come soon when our app. will be
> replaced by C#. This will be the saddest day of my
> professional life.
>
> Anyway, Chris - Pl. advice as to how SET NOCOUNT ON  can
> fix the issue.
>
> Thnx
> Anil
> > Hi Anil;
> >
> >    Pretty much the same here in Canada's capital. Most
> > ASE shops have now  switched to SS due to management
> >  pressure. :-(
> >
> >
> > Regards ... Chris
> > President: OSUG / STD Inc.
> > Blog: http://chrispollach.blogspot.com
> > PBDJ: http://chrispollach.sys-con.com
> > SourceForge: http://sourceforge.net/projects/stdfndclass
> >
> > "Anil" wrote in message
> > news:4cf9733b.2473.1681692777@sybase.com...
> >
> > Hello Chris
> > Yes. Its unfortunate that we are forced to downgrade.
> > Been working in Sybase for the last 15 years. Blame it
> > on Mgmt. :(
> >
> > I was researching on this issue &found a link where
> > Bruce Armstrong had suggested to put SET NOCOUNT ON in
> > the trigger. Adding this, my data is saving & I am not
> > getting any error. But I am not understanding how
> > NOCOUNT ON can resolve this problem. I am just worried
> > if this is the correct solution OR this is just masking
> > the error. How can SET NOCOUNT ON mask this error & is
> > this the correct solution?
> > Anil
> >
> > > Hi Anil;
> > >
> > >   Sorry to hear that you have had to downgrade your
> > > DBMS! :-))))
> > >
> > > I suspect that changing the DW update to Key only will
> > > be the ticket. I  think the problem might be due to
> > > checking the updatable columns where maybe  the DBA
> > > has added a trigger that is updating something,
> > > changed a data type thus the columns behaviour, etc.
> > >
> > > HTH
> > >
> > > Regards ... Chris
> > > President: OSUG / STD Inc.
> > > Blog: http://chrispollach.blogspot.com
> > > PBDJ: http://chrispollach.sys-con.com
> > > SourceForge:
> > http://sourceforge.net/projects/stdfndclass >
> > > "anil" wrote in message
> > > news:4cf86867.775f.1681692777@sybase.com...
> > >
> > > We are currently migrating our app from SYbase to
> > > MS-SQL Server 2008. We are using PB11.5 & connecting
> > > to MS-SQL Server using the PB Native Driver
> > (SQLNCLI10). >
> > > In one of the windows we are getting "Row changed
> > > between Retrieve & Update". Can anybody give a clue
> > > why this might be happening.
> > >
> > > The window works perfectly in SybaseBUT is failing in
> > > MS_SQL.I know the the general reason for getting this
> > > msg. BUT what we are surprised is that this works
> > > great in Sybase & for some reason fails in MS_SQL
> > > Server. I know for sure that I am the only one
> > > accessing this data so there is no reason for getting
> > > the "ROW CHANGED.." error. The DW has of course 'key &
> > > updateable columns' & if we change to 'key columns'
> > > this might work in MS-SQL. BUT want to know what could
> > > be the cause for this to fail in MS-SQL. Has anybody
> > > else experienced this when migrating from Sybase to
> > > MS-SQL Server2008 Thnx
> > > Anil
> > >
> >
> 

0
Terry
12/6/2010 6:45:59 PM
Reply:

Similar Artilces:

Modify Datawindow Update properties & ErrorCode -3 Row Change Between Retrieve and Update!
Hi, I'm Using PB703 Build 10213 I've seen in Help under subject Modify (Datawindow Method) an example where you can change the Update properties of a Datawindow and update a 2nd table. Here It is: // Update department, as set up in the DW painter rc = dw_1.Update(TRUE, FALSE) IF rc = 1 THEN //Turn off update for department columns. dw_1.Modify("department_dept_name.Update = No") dw_1.Modify("department_dept_id.Update = No") dw_1.Modify("department_dept_id.Key = No") // Make employee table updatable. dw_1.Modify( & "...

row changed between retrieve & update #2
I am using SQLserver 6.5 , PB6.5 and PFC to develop the application. In dberror event of the DW, I already check the error code -3 and then display my own message and then 'return 3' in order to stop the system to dispaly the error msg (because of too ugly interface). The system display my own msg and system msg also at the end. Is there any setting that I require to config in order to inhibit the system error msg (row changed between retrieve & update)????? Thanks in advance. You need to return 1 in the dberror event to prevent the standard message from being ...

ASA 8.0.2 & JConnect
Using ASA 8.0.2 and JConnect on a Win2k machine. Perform a retrieve against a datawindow then change one column's value for one row. Update against datawindow results in error message "row number was changed between retrieve and update. No changes have been made to the database". Anyone had this problem? If so, what is the solution?. Thanks! dennis Are you sure that there was only the one connection to the database? Assuming the datawindow was populated by a query run at isolation level 0, then another connection could update one of the records after the datawin...

Linkage service & Row changed between retrieve & update
Hello all, Consider a master and a detail dw linked by ai_setusecollinks = 2 Whenever I make a change in one of the fields in the detail and try to save it (using the save menu item that comes with PFC) I was getting an error "Row changed between retrieve and update" The detail dw is set to key and updateable. However with the same settings any change in the master works OK AFAIK, "Row changed between retrieve and update" happens when the where clause cannot locate the row in which the data is to be changed. Now, in my case there was no other user modifyin...

Row changed between retrieve and update #2
I get the error message "Row changed between retrieve and update" when I modify a row and try to update it back to the database. I think I got this once before and remember that it was hard to figure out what was going on, and I can't remember what it was. Does anyone know, in general, what this message means? TIA, Mike Bravo (310) 401-1145 mbravo@vircon.com This means that the datawindow generated an UPDATE SQL statement, and the WHERE clause that it generated didn't match any rows in the database. The reason the message is phrased this way is that, wit...

Row changed between retrieve and update. #2
I have a frustrating problem that I hope someone can help me with. In a datawindow, a new row is inserted. The user fills in the data. The datawindow is updated without resetting update flags. A stored procedure then does some validation and finds an error on the new row, so a rollback is issued. The user fixes the problem and resaves. The update is performed without resetting update flags and validation is passed. A commit is issued and the update flag is reset. Now the user makes another change to the same row. When the update is issued, we get an error message "...

Row Changed between Retrieve & Update
PB803 WinME Hi all, I have another question. 1. I have an updatable dw. 2. My user inserts some data, then clicks on an "Update" button. 3. The app makes dw_1.Update() but, due to an user error, the update fails (for instance, for an integrity coinstrain violation). 4. The user corrects the wrong data and clicks "Update" again. 5. PB issues the message "Row Changed between Retrieve & Update" and the update fails. What's wrong? TIA Luca. P.S. I recall that some similar question has been already posted to the ns. How can I read old mes...

Row changed between retrieve and update. #2
This is a multi-part message in MIME format. ------=_NextPart_000_0008_01C34555.C700C900 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable What is my problem with this? Row changed between retrieve and update. Receiving this error. No changes made to database. UPDATE "services" SET "taxable" =3D ?, "consultant_code" =3D ?, "time" = =3D ?, "services" =3D ? WHERE "client_code" =3D ? AND "service_no" IS = NULL AND "date" =3D ? AND "taxable&quo...

Row change between retrieve and update #2
"Row Change between retrieve and update". I got this message, when I modified a primary key field. I need to modify this field, after retrieve. Anyone knows how to avoid this message, in datawindow update? Thanks in advance Javier I am not sure of your requirements but as a rule you should not be updating a primary key field if you can help it. How are you are you updating the field? Tyler "Javier Gonz�lez" <javier.gonzalez@arico-soluciones.com> wrote in message news:#qp#XSyLDHA.279@forums-2-dub... > "Row Change between retrieve an...

Row changed between Retrieve & Update
I'm getting an error "Row changed between Retrieve & Update" when the datawindow trying to update. I had tried all the methods (like check the "empty string is null" attribute for all update field, set DisableBind = 1 in my DbParms and modify "Key Modification" into use update option) but still got the problem. How can I correct it ? Any suggestion is also appreciated. Thanks in advance. ------------Update statement from sqlsyntax --------- UPDATE "CE_T_BANK_ACCOUNTS" SET "BANK_ADDRESS_REMARK" = :1 WHERE "CEREF"...

Row changed between retrieve and update #2
I have a datawindow that has 2 updateable columns. I am calling a traditional update against the datawindow. When I have the where clause set to 'key and updateable' or 'key and modified', I get the error "Row changed between retrieve and update". However, there is no update prior to this update and I can't seem to understand why this message is appearing. When I set the where clause to key column only, it works fine. This, however, does not allow me to protect from network conflicts. Any thoughts would be greatly appreciated... I have thought about r...

rows changed between retrieve and update #2
PB 11.5 or PB 10.2 I asked this in the general powerbuilder group a while ago. No reaction. In a other newsgroup I learned a command that might be helpfull. In the database is some data that is unreadable. We try to delete the database but allways get the message as describe. The data is (a few examples): description, description as binay 'ΗΛΙΚΙΑ',0xce97ce9bce99ce9ace99ce91 'ͅՁ\u05cfҁ \u0516\x83Ɖ͠\x90ЂЋ',0xccc5d4c1d6cfd1c120d3d6c1c3c5c9cf20c1d0cfc2cfcbc7 'ͅՁ\u05cfҁ \u0516\x83Ɖ͠яʼn',0xccc5d4c1d6cfd1c120d3d6c1c3c5c9cf20d0cfc4c9c1 The database...

Row changed between retrieve and update #2
Error while Updating datawidnow When I try to Insert&Update a datawindow in ASA 7.0.3, It thorws an error "Row Changed between Retrieve and Update". (I'm moving data from datastore to Datawindow and updating the datawindow through PFC) BUT,THE SAME WORKS FINE WITH ASA 7.0. Why is that so? IS there any solution ... pls? Thanks, Gokul Try changing your update properties. That should do the trick ! Greets, Davy <Gokulakrishnan_R> wrote in message news:B6231791BEB8ABC6005D2A4D85256B81.005D2A6585256B81@webforums... > Error while Upd...

row changed between retrieve & update (mysql)
Hi all, Using PB 9.0.3#8565, MySQL 5 (all tables are InnoDB) and myODBC 3.51.12 I'm making a multi-user application (PB) that uses myOdbc (WinXP) to connect to the same DB server. My key-generation is done using a table to store the keys for each table: KEYTABLE(Tablename, last_id, ...) Each insert/addRow will lookup the last appointed key value in this table and update the table with the new value. However, when i try this both sessions return the same value (even when session1 updated the table before session2 re-reads the table- verified with MySQL Control Cente...

Web resources about - Row changed between Retrieve & Update #2 - sybase.powerbuilder.datawindow

Facebook Developers Can Retrieve Users’ Profile Pictures In Different Sizes
Facebook introduced a way for developers to retrieve users’ profile pictures for use within their applications in different sizes, rather than ...

Winston retrieves the news
... food and losing weight. Three months ago, we were told he had lymphosarcoma of the GI tract. On March 10, 2008, Winston was called to go retrieve ...

Gizzard uses a rope to retrieve a submerged gift, 10 second retrieval from noticing the rope - YouTube ...
This is the second attempt, and the second occurrence he has ever seen this contraption. Without the rope, he would probably drown to retrieve ...

Dutch backpacker paid $5 an hour to retrieve golf balls from lakes
A Dutch backpacker claims he was paid as little as $5 an hour to wade through murky ponds and lakes retrieving thousands of lost golf balls. ...

People Are Willing To Go To Extreme Lengths To Retrieve Their Stolen Smartphones
People are willing to pay a ton of money and potentially put themselves in danger to retrieve their stolen smartphones, a new survey has found. ...

Police officer shot at 'very large' shark to retrieve body of swimmer
A policeman who shot a shark in a bid to retrieve the body of a swimmer it had killed says his first bullets disintegrated as they hit the water ...

Divers retrieve body from NSW floodwaters
A woman's body has been retrieved from a submerged car in a creek in Maitland.

Tourist plunges to death from Potts Point rooftop park trying to retrieve football: police
A French tourist who fell to his death from a rooftop park in Potts Point in inner Sydney was attempting to retrieve a football that had gone ...

The art of war: Quest to retrieve what Nazis stole
Susan Fisher Sullam tells of learning her father was a wartime treasure hunter, tracking down what the Nazis had plundered from Holocaust victims. ...

Investigators retrieve more human remains at MH17 crash site in eastern Ukraine but wreckage cannot yet ...
Dutch forensic experts recover further human remains at the crash site of downed flight MH17.

Resources last updated: 11/28/2015 4:56:30 PM