cannot delete record in dbgrideh

Discussion of open issues, suggestions and bugs regarding ODAC (Oracle Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
zhoukun022
Posts: 8
Joined: Mon 19 Mar 2012 04:39

cannot delete record in dbgrideh

Post by zhoukun022 » Thu 22 Mar 2012 15:12

=======================================

procedure Tfrmyhgl.BitBtn_shchClick(Sender: TObject);
begin
if Application.MessageBox('DELETE?','A,MB_YESNO )= ID_Yes then
begin
oraquery1.Delete;
end;
end;

procedure Tfrmyhgl.BitBtn_bcClick(Sender: TObject);
begin
with OraQuery1 do
begin
LocalUpdate:=false;
ApplyUpdates;
Edit;
Post;
LocalUpdate:=true;
end;
try
frmmain.orasession1.Commit;
Application.MessageBox('SAVE SUCCESS。','A',0+64);
except
frmmain.orasession1.Rollback;
Application.MessageBox('FAIL','B',0+64);
raise;
end;
end;
==============================
The same code in two situation have different result.
situationA :ORALCE9,XP 32BIT,DBGRIDEH(EHLIB),DELPHI2006,ODAC FOR BDS2006
situationB:ORACLE10,WIN7 32BITor64BIT,DBGRIDEH(EHLIB forXE),DelphiXE,ODAC fro DELPHIXE.

RESULT:
A:can insert,update,delete
BUT in B,only can insert,update, cannot delete。AND in DBGRIDEH can see record be deleted,refresh(close then open ORAQUERY),the record which be delete just time has revived.It cannot be delete commit.

I have no idea,that is magic~

what can i do?thank u

zhoukun022
Posts: 8
Joined: Mon 19 Mar 2012 04:39

NEW DISCOVERY

Post by zhoukun022 » Fri 23 Mar 2012 08:10

I find some reasons that no matter develop in win7 or winxp ,oracle9 or 10,DelphiBDS2006 or XE,Ehlib for bds2006 or XE ,when i install the ODAC(registered)10 OR ODAC15 ,the code all cannot delete record.AND install the ODAC (cracked) is correct!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Fri 23 Mar 2012 09:20

Hello,

Please send to alexp*devart*com a small sample demonstrating the problem without using any additional DB components (DBGrid, ehGrid, etc.), including scripts for creating and filling of tables, in order we could reproduce and fix the problem.

zhoukun022
Posts: 8
Joined: Mon 19 Mar 2012 04:39

Post by zhoukun022 » Fri 23 Mar 2012 12:00

AlexP wrote:Hello,

Please send to alexp*devart*com a small sample demonstrating the problem without using any additional DB components (DBGrid, ehGrid, etc.), including scripts for creating and filling of tables, in order we could reproduce and fix the problem.
hi,AleXP:

My codes have no problem.I doubt that ODAC15 and 10 have some trouble.Because the same code in other PC wihtout installed ODAC10 or 15 is normal.SO can you tell me how to install ODAC10 or 15 correctly.
I had install cracked ODAC10 untill buy ODAC 15 TEAM LICENCE.
Thank u.

sbslavonac
Posts: 35
Joined: Mon 02 Apr 2007 09:14

Post by sbslavonac » Fri 23 Mar 2012 12:02

I believe that ODAC last version is 8.1.5?
Boris

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Fri 23 Mar 2012 13:24

Hello,

Perhaps, you are using an old ODAC version, try downloading and installing the latest ODAC Trial versions for Delphi XE from our site http://www.devart.com/odac/odac15.exe, and try to reproduce the problem once again.
In addition, please explain what you mean under "Because the same code in other PC wihtout installed ODAC10 or 15 is normal"

zhoukun022
Posts: 8
Joined: Mon 19 Mar 2012 04:39

Post by zhoukun022 » Fri 23 Mar 2012 13:51

AlexP wrote:Hello,

Perhaps, you are using an old ODAC version, try downloading and installing the latest ODAC Trial versions for Delphi XE from our site http://www.devart.com/odac/odac15.exe, and try to reproduce the problem once again.
In addition, please explain what you mean under "Because the same code in other PC wihtout installed ODAC10 or 15 is normal"
other PC has not installed oadac10 or 15(Genuine),they installed ODAC10(cracked),my code can be complied by thenm,and can delete record.

zhoukun022
Posts: 8
Joined: Mon 19 Mar 2012 04:39

Post by zhoukun022 » Fri 23 Mar 2012 13:54

AlexP wrote:Hello,

Perhaps, you are using an old ODAC version, try downloading and installing the latest ODAC Trial versions for Delphi XE from our site http://www.devart.com/odac/odac15.exe, and try to reproduce the problem once again.
In addition, please explain what you mean under "Because the same code in other PC wihtout installed ODAC10 or 15 is normal"
Besides,http://www.devart.com/odac/odac15.exe ,can not be download,
I have a registration userid which I buyed,I download odac15.exe with it,and it is not the lastest ODAC?

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Fri 23 Mar 2012 14:50

hello,

We have checked the link http://www.devart.com/odac/odac15.exe , and the installation file is downloaded with no problems.
Files named as odacXX.exe are the trial versions. If you are a registered user, you have access (depending on the license) to the odac81d15pro.exe, odac81d15std.exe or odac81src.zip files, these versions are available for downloading at our sitesecure.devart.com using the credentials given when buying the product.

zhoukun022
Posts: 8
Joined: Mon 19 Mar 2012 04:39

Post by zhoukun022 » Sun 01 Apr 2012 10:21

I download odac81d15pro.exe 8.1.5.0,02-Mar-2012,and reinstalled,but the problem has been also reappear,I cannot delete record.

Is it wrong when I install it?And how to install correctly?

thank u.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Wed 04 Apr 2012 13:29

Hello,

We cannot fix the problem until we reproduce it. That's why we need an example that demonstrates the problem.

zhoukun022
Posts: 8
Joined: Mon 19 Mar 2012 04:39

Post by zhoukun022 » Thu 05 Apr 2012 00:48

HI,I send my porject to your mail.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Thu 05 Apr 2012 14:54

Hello,

In the CachedUpdates mode all changes are stored in the dataset buffer. So you can call the ApplyUpdates method later to send the changes to the database.
In the LocalUpdate mode data in dataset are changed locally but information about changes is not stored. So you cannot send the changes to the database.
To resolve the problem, you should set the LocalUpdate option to False.

zhoukun022
Posts: 8
Joined: Mon 19 Mar 2012 04:39

Post by zhoukun022 » Fri 06 Apr 2012 08:43

thank u for your help,problem is solved.

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Post by AlexP » Fri 06 Apr 2012 09:10

Hello,

Glad to see that the problem was solved. If you have any other questions, feel free to contact us.

Post Reply