cannot delete record in dbgrideh
-
zhoukun022
- Posts: 8
- Joined: Mon 19 Mar 2012 04:39
cannot delete record in dbgrideh
=======================================
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
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
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!
-
zhoukun022
- Posts: 8
- Joined: Mon 19 Mar 2012 04:39
hi,AleXP: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.
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
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"
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
other PC has not installed oadac10 or 15(Genuine),they installed ODAC10(cracked),my code can be complied by thenm,and can delete record.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"
-
zhoukun022
- Posts: 8
- Joined: Mon 19 Mar 2012 04:39
Besides,http://www.devart.com/odac/odac15.exe ,can not be download,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"
I have a registration userid which I buyed,I download odac15.exe with it,and it is not the lastest ODAC?
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.
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
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.
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.