BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

EAccessViolation

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress)
View previous topic :: View next topic  
Author Message
Koko13
Guest





PostPosted: Thu Feb 10, 2005 12:07 am    Post subject: EAccessViolation Reply with 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
paladin
Guest





PostPosted: Fri Feb 11, 2005 3:27 am    Post subject: Re: EAccessViolation Reply with quote



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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> Delphi Databases (dbExpress) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.