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.

Problem wih

2 posts in Delphi Last posting was on 2012-01-16 11:39:40.0Z
Marc-Philippe Graveron Posted on 2012-01-13 16:58:07.0Z
Date: Fri, 13 Jan 2012 17:58:07 +0100
From: Marc-Philippe Graveron <marc-philippe.graveron@i2a.info>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; fr; rv:1.9.2.23) Gecko/20110920 Lightning/1.0b2 Thunderbird/3.1.15
MIME-Version: 1.0
Newsgroups: Advantage.Delphi
Subject: Problem wih
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 8bit
X-Antivirus: avast! (VPS 120113-0, 13/01/2012), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 81.255.33.93
Message-ID: <4f106267$1@solutions.advantagedatabase.com>
X-Trace: 13 Jan 2012 08:57:11 -0700, 81.255.33.93
Lines: 24
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Delphi:25619
Article PK: 1109199

Hello,

I've a problem with a refresh on a dataset.

The first one at the beginning don't send a error but the second one at
the send me a error : "Vous devez validez les modifications avant de
rafraîchir les données" => "You need to validate modifications before
refreshing data"

dm_AutomateCyto.cds_troncyto.Refresh;
dm_AutomateCyto.cds_troncyto.Edit;
dm_AutomateCyto.cds_tronCyto.fieldbyname('NUMDEMANDE').AsString
:= ListeDemandes.DataSource.DataSet.fieldbyname('IDDEMUTIL').AsString;
dm_AutomateCyto.cds_tronCyto.fieldbyname('NOMPAT').AsString :=
ListeDemandes.DataSource.DataSet.fieldbyname('NOMPAT').AsString;
dm_AutomateCyto.cds_tronCyto.fieldbyname('PRENOMPAT').AsString :=
ListeDemandes.DataSource.DataSet.fieldbyname('PRENOMPAT').AsString;
dm_AutomateCyto.cds_troncyto.Post;
dm_AutomateCyto.cds_troncyto.ApplyUpdates(-1);
dm_AutomateCyto.cds_troncyto.Refresh;

Thanks for your answer.

Marc-Philippe.


Douglas Woodrow Posted on 2012-01-16 11:39:40.0Z
Message-ID: <fwNyT+C8xAFPFwOA@woodrowhorsfall.plus.com>
Date: Mon, 16 Jan 2012 11:39:40 +0000
From: Douglas Woodrow <newsgroups@nospam.demon.co.uk>
Newsgroups: Advantage.Delphi
Subject: Re: Problem wih
References: <4f106267$1@solutions.advantagedatabase.com>
Lines: 27
Organization: Woodrow Horsfall Ltd
MIME-Version: 1.0
Content-Type: text/plain;charset=iso-8859-1
Content-Transfer-Encoding: 8bit
User-Agent: Turnpike/6.05-U (<rcsiuWiHqsbmV8hkJJHWu9kDbz>)
NNTP-Posting-Host: 84.92.177.174
X-Trace: 16 Jan 2012 03:38:41 -0700, 84.92.177.174
Path: solutions.advantagedatabase.com!nospam.demon.co.uk!newsgroups
Xref: solutions.advantagedatabase.com Advantage.Delphi:25620
Article PK: 1109198

On Fri, 13 Jan 2012 17:58:07, Marc-Philippe Graveron

<marc-philippe.graveron@i2a.info> wrote
>error : "Vous devez validez les modifications avant de rafraîchir les
>données" => "You need to validate modifications before refreshing data"
>
> dm_AutomateCyto.cds_troncyto.ApplyUpdates(-1);
> dm_AutomateCyto.cds_troncyto.Refresh;

Hi Marc-Philippe,

I think you should check that ApplyUpdates(-1) returns 0.

And if it doesn't, deal with the problem appropriately (or not! :)

//------------------------
if (dm_AutomateCyto.cds_troncyto.ApplyUpdates(-1) <> 0) then
begin
MessageDlg('Something went wrong.', mtWarning, [mbOK], 0);
dm_AutomateCyto.cds_troncyto.CancelUpdates;
end;
dm_AutomateCyto.cds_troncyto.Refresh;
//------------------------


(What does AutomateCyto do? It sounds intriguing.)
--
Doug Woodrow