home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.paradox      To crash or not to crash, asks Borland      9,834 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,564 of 9,834   
   Kenneth to All   
   dataInsertRecord not Insertin'...?   
   09 Jan 09 10:23:19   
   
   From: usenet@soleSPAMLESSassociates.com   
      
   Howdy,   
      
   I have the code below to open a new (blank) record, and   
   insert a new sequential entry number. 'Seems simple   
   enough...   
      
   But when it fires, the entry number increments, but the old   
   record remains visible, and is not modified in the table. So   
   rather than the new entry number being assigned to the new   
   (blank) record, it is assigned to the record that preceded   
   it.   
      
   If, at that point, I touch the Insert key again, the counter   
   increments again, and a new blank record is inserted as it   
   should be.   
      
   There is other code on the form, but I have just run a   
   search on PAL$SRC.DB and the string "record" appears only   
   once, so  I wondered if there was something obvious in those   
   lines that I am missing.   
      
      
   method action(var eventInfo ActionEvent)   
   var   
   	tc2 tCursor   
   endVar   
      
   if eventInfo.id()=dataInsertRecord then   
      
   DoDefault   
      
   	if not tc2.open(":MONEY:EntryNum.DB") then   
   		errorShow()   
   	endIf   
      
   	EntryNumber = tc2.entryNum   
      
   	tc2.edit()   
   	tc2.entryNum = EntryNumber + 1   
   	edit()   
   	entry = tc2.entryNum   
   	tc2.endEdit()   
   	tc2.close()   
      
   endIf   
   endMethod   
      
      
   Many thanks for any thoughts,   
   --   
   Kenneth   
      
   If you email... Please remove the "SPAMLESS."   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca