Radicore Forum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » RADICORE development » Bug Reports » Insertorupdate and autoincrement
Re: Insertorupdate and autoincrement [message #1803 is a reply to message #1793] Sat, 08 November 2008 11:11 Go to previous message
AJM is currently offline  AJM
Messages: 2361
Registered: April 2006
Location: Surrey, UK
Senior Member
I have modified the insertOrUpdate() method so that it calls isPkeyComplete() before performing the database lookup. If the primary key is not complete, such as when an auto_increment column has not been specified, then it will skip the lookup and force an INSERT.

It is therefore imperative that when wanting to perform an INSERT on a table which contains an auto_increment key that the column does not appear in the field array. If it appears with any value, even NULL or ZERO, then isPkeyComplete() will return TRUE and a lookup will be performed.

Please see the attached file for the patched code.


 
Read Message
Read Message
Read Message
Previous Topic: Multi2 -> popup2 not calling _cm_pre_updateRecord?
Next Topic: Problem with accentuated char and Uppercase
Goto Forum:
  


Current Time: Tue Sep 10 15:49:33 EDT 2024

Total time taken to generate the page: 0.00907 seconds