Page 1 of 1
cannot delete record in dbgrideh
Posted: Thu 22 Mar 2012 15:12
by zhoukun022
=======================================
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
NEW DISCOVERY
Posted: Fri 23 Mar 2012 08:10
by zhoukun022
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!
Posted: Fri 23 Mar 2012 09:20
by AlexP
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.
Posted: Fri 23 Mar 2012 12:00
by zhoukun022
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.
Posted: Fri 23 Mar 2012 12:02
by sbslavonac
I believe that ODAC last version is 8.1.5?
Boris
Posted: Fri 23 Mar 2012 13:24
by AlexP
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"
Posted: Fri 23 Mar 2012 13:51
by zhoukun022
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.
Posted: Fri 23 Mar 2012 13:54
by zhoukun022
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?
Posted: Fri 23 Mar 2012 14:50
by AlexP
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.
Posted: Sun 01 Apr 2012 10:21
by zhoukun022
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.
Posted: Wed 04 Apr 2012 13:29
by AlexP
Hello,
We cannot fix the problem until we reproduce it. That's why we need an example that demonstrates the problem.
Posted: Thu 05 Apr 2012 00:48
by zhoukun022
HI,I send my porject to your mail.
Posted: Thu 05 Apr 2012 14:54
by AlexP
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.
Posted: Fri 06 Apr 2012 08:43
by zhoukun022
thank u for your help,problem is solved.
Posted: Fri 06 Apr 2012 09:10
by AlexP
Hello,
Glad to see that the problem was solved. If you have any other questions, feel free to contact us.