🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.pascal.delphi.databases
Article #98

Bug in Delphi when posting/appending records?

#98
From: Tore Aursand
Date: Fri, 19 Jun 1998 00:00
36 lines
1756 bytes
Is this a bug?

I have never been in trouble when posting new records to a table,
but now it seems like *Delphi* is stuck.  Delphi says that "field
'id' must have a value" when trying to run the following snippet:

  with Table1 do
   begin
   { Generates an unique ID }
     if RecordCount > 0 then
      begin
        Last;
        NewID := Table1['ID'];
      end
     else NewID := 0;
   { Posts new information }
     Append;
     Table1['ID'] := NewID;
     Table1['Name'] := NameEdit.Text;
     Table1['Reference'] := ReferenceEdit.KeyValue;
     Post;
   end;

What is wrong?  I have another, similar, form in the program, and
it works just fine there.  Well - the two forms (with this little
code snippet) doesn't *do* the same in a practical meaning. :)

Can anyone figure *what* can be wrong here?


-- 
Tore Aursand - Frosta, Norway - toreau@sn.no - http://home.sol.no/~toreau/
"Spiralling falling, a silver machine.  From wings of freedom, silent
 above.  Eyelids were burning, summer sun roasting.  Tumbling chrome
 in the clear blue sky." -- Bruce Dickinson (Strange Death in Paradise)
Technical Details
Message-ID: <k/Zi1ErRvWaU092yn@sn.no>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: ffff5,14c9d3dfb74f9fb9,start
X-Google-Attributes: gidffff5,public
X-Google-Thread: ff75c,14c9d3dfb74f9fb9,start
X-Google-Attributes: gidff75c,public
From: toreau@sn.no (Tore Aursand)
Subject: Bug in Delphi when posting/appending records?
Date: 1998/06/19
Message-ID: <k/Zi1ErRvWaU092yn@sn.no>
X-Deja-AN: 364015935
Content-Transfer-Encoding: 8bit
Mime-Version: 1.0
Reply-To: toreau@sn.no
Content-Type: text/plain; charset=ISO-8859-1
Organization: SN Internett
Newsgroups: comp.lang.pascal.delphi.databases,borland.public.delphi.database.desktop