 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Koko13 Guest
|
Posted: Thu Feb 10, 2005 12:07 am Post subject: EAccessViolation |
|
|
I have a simple dbexpress application that uses mySQL. It has a grid and a
delete button. When I delete the first record it works fine, but when I
press delete again (to delete the next record) I get an EAccessViolation.
'Access Violation in .... dbexpmysql.dll'. Here is the code for my delete
button:
procedure TForm1.btnDeleteClick(Sender: TObject);
begin
if dm.clientdataset.State = dsEdit then
dm.clientdataset.Cancel;
dm.clientdataset.Delete;
dm.clientdataset.ApplyUpdates(0);
end;
what am I doing wrong?
thanks, koko
|
|
| Back to top |
|
 |
paladin Guest
|
Posted: Fri Feb 11, 2005 3:27 am Post subject: Re: EAccessViolation |
|
|
koko,
I tried your code and it worked with no problems
using D7.1 and mysql 3.23.58
Can you tell us what versions of things you have?
paladin
"Koko13" <koko (AT) ecst (DOT) csuchico.edu> wrote
| Quote: | I have a simple dbexpress application that uses mySQL. It has a grid and a
delete button. When I delete the first record it works fine, but when I
press delete again (to delete the next record) I get an EAccessViolation.
'Access Violation in .... dbexpmysql.dll'. Here is the code for my delete
button:
procedure TForm1.btnDeleteClick(Sender: TObject);
begin
if dm.clientdataset.State = dsEdit then
dm.clientdataset.Cancel;
dm.clientdataset.Delete;
dm.clientdataset.ApplyUpdates(0);
end;
what am I doing wrong?
thanks, koko
|
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|