Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 10 of 17 total
Thread DELETE (NOK) / INSERT (OK)
Tue, Apr 2 2013 6:22 PMPermanent Link

Paul Waegemans

IMS bvba

Avatar

procedure TFrmVolledig.Button1Click(Sender: TObject);
begin
Database.StartTransaction;
  try
  WITH contacten1 DO
     BEGIN
     CONTACTEN1.Delete;
     END;
  Database.Commit;
  except
  Database.Rollback;
  raise;
  end;
end;
 

This does not work (NOK).  ANY IDEA WHY NOT?  

The following code works very well (OK):

procedure TFrmNieuweGebruiker.Button1Click(Sender: TObject);
begin
Database.StartTransaction;
try
with nieuwecontacten1 do
     begin
     nieuwecontacten1.Insert; // Required to avoid conflict with Insert system function
     Columns['Naam'].AsString:=TRIM(EdtNaam.text);
     Columns['Voornaam'].AsString:=TRIM(EdtVoornaam.text);             
     Columns['Volnaam'].AsString:=TRIM(EdtNaam.text)+' '+
                                  TRIM(EdtVoornaam.text);
     Columns['Geboortedatum'].Asdate:=StrToDate(EdtGeboortedatum.text);
     Columns['Straat'].AsString:=TRIM(EdtStraat.text);
     Columns['Postcode'].AsString:=TRIM(EdtPostcode.text);
     Columns['Plaats'].AsString:=TRIM(EdtPlaats.text);
     Columns['Telefoon'].AsString:=TRIM(EdtTelefoon.text);
     Columns['gsm'].AsString:=TRIM(Edtgsm.text);
     Columns['email'].AsString:=TRIM(EdtEmail.text);
     Columns['paswoord'].AsString:=TRIM(EdtPaswoord.text);
     Save;
     end;
Database.Commit;
except
Database.Rollback;
raise;
end;
Wed, Apr 3 2013 7:38 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Paul,

<< This does not work (NOK).  ANY IDEA WHY NOT?   >>

I assume that you're not seeing an error message at all ?  Also, what
database are you using for your dataset ?

Thanks,

Tim Young
Elevate Software
www.elevatesoft.com


Wed, Apr 3 2013 9:19 AMPermanent Link

Paul Waegemans

IMS

dbsrvr 4.33 BUILD 4

Database System Utility 4.34 build 2

I retrieve the data from a remote database.

Contact_ID is a autoinc field (I read a post that this can give an problem)

I assume that you're not seeing an error message at all ?  Also, what
database are you using for your dataset ?

Thanks,

Tim Young
Elevate Software
www.elevatesoft.com


Thu, Apr 4 2013 7:14 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Paul,

<< I assume that you're not seeing an error message at all ? >>

Are you ?  You didn't answer that part. Wink Also, is the problem
browser-specific ?

<< Also, what database are you using for your dataset ? >>

I tried it with a DBISAM table and a Firebird table - both work fine.

Tim Young
Elevate Software
www.elevatesoft.com

Thu, Apr 4 2013 10:19 AMPermanent Link

Paul Waegemans

IMS bvba

Avatar

I receive a database commit response error at line 4399

The problem is as well with IE as Mozilla Firefox


"Tim Young [Elevate Software]" wrote:

Paul,

<< I assume that you're not seeing an error message at all ? >>

Are you ?  You didn't answer that part. Wink Also, is the problem
browser-specific ?

<< Also, what database are you using for your dataset ? >>

I tried it with a DBISAM table and a Firebird table - both work fine.

Tim Young
Elevate Software
www.elevatesoft.com




Attachments: ERROR.jpg
Sat, Apr 6 2013 8:17 AMPermanent Link

Paul Waegemans

IMS bvba

Avatar

and this is the error I get at designtime



Attachments: DELETEERROR.jpg
Sat, Apr 6 2013 11:26 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Paul,

<< and this is the error I get at designtime >>

Does the table have a primary key ?  It will need a primary key in order to
be updateable with the EWB dataset architecture.

Thanks,

Tim Young
Elevate Software
www.elevatesoft.com
Sat, Apr 6 2013 11:57 AMPermanent Link

Dominique Willems

Is "Munkzwalm" just coincidence or is that your neck of the woods...?
Sun, Apr 7 2013 4:40 AMPermanent Link

Paul Waegemans

IMS bvba

Avatar

I was just going to trie your suggestion of the primary key and I was doing some restyling of my forms and all of a sudden when I run my project I see only a blank sheet.  No ERROR MESSAGES as you can see in the attached error file.

Weard!!


"Tim Young [Elevate Software]" wrote:

Paul,

<< and this is the error I get at designtime >>

Does the table have a primary key ?  It will need a primary key in order to
be updateable with the EWB dataset architecture.

Thanks,

Tim Young
Elevate Software
www.elevatesoft.com



Attachments: BLANKSCREEN.jpg
Sun, Apr 7 2013 4:41 AMPermanent Link

Paul Waegemans

IMS bvba

Avatar

??

"Dominique Willems" wrote:

Is "Munkzwalm" just coincidence or is that your neck of the woods...?
Page 1 of 2Next Page
Jump to Page:  1 2
Image