ducky77ar Posted December 4, 2018 Share Posted December 4, 2018 Hello, I'm using an ODBC MySQL connector to get data from cubecart to a front end Access Database. I added 2 custom fields in the order_summary table, i noticed that when i try to edit them I get a write conflict error. The research I did on this error concludes I need to add a timestamp field in order_summary for Access to work correctly. Would adding a timestamp field on that table affect any of the shopping cart functionality? Thank you! Link to comment Share on other sites More sharing options...
Noodleman Posted December 4, 2018 Share Posted December 4, 2018 Acces.... *shudder*... the error I am guessing you are getting will relate to MySQL strict mode. you can disable it if needed Link to comment Share on other sites More sharing options...
ducky77ar Posted December 4, 2018 Author Share Posted December 4, 2018 i checked and it only says NO_ENGINE_SUBSTITUTION does that mean is off or on? mysql version is 5.6.41 Link to comment Share on other sites More sharing options...
bsmither Posted December 4, 2018 Share Posted December 4, 2018 Does the error message give a clue as to what the changed data is conflicting with when attempting to execute the UPDATE statement? Link to comment Share on other sites More sharing options...
ducky77ar Posted December 4, 2018 Author Share Posted December 4, 2018 yes, it says I'm trying to save a record that is been saved by another user, copy to clipboard or drop changes. i just copied the order_summary table to another server with the same mysql version and same MySQL NO_ENGINE_SUBSTITUTION, and tried editing a record, it did allow me. So i believe it's a setting on the live server, just can't figure out what. Also noticed that when i link the table to Access, it doesn't ask me for primary key... the error i get is pretty generic of Access DBs, most people say the error will go away if i add a timestamp to the table, which was the original question, but i don't know if that will break any functionality of the shopping cart? Link to comment Share on other sites More sharing options...
ducky77ar Posted December 4, 2018 Author Share Posted December 4, 2018 I'm just realizing that it's not giving me errors on all records, only on specific ones. so i starting by sorting the table to try to figure out where is it that i get the errors. I'm not sure I'm correct, but seems like I have no issues editing records where the field "discount_type" is null, if the record has an "f" in discount_type i cannot edit What is that field used for? Thank you! Link to comment Share on other sites More sharing options...
ducky77ar Posted December 4, 2018 Author Share Posted December 4, 2018 i made a copy of order_summary and named it test, i added the timestamp field, now i have no writing conflicts. So going back to the original question, if i add a timestamp field in order_summary, would that break anything in the shopping cart? Thank you! Link to comment Share on other sites More sharing options...
bsmither Posted December 4, 2018 Share Posted December 4, 2018 No. CubeCart will ignore it. However, the column must not be NOT NULL as otherwise this will require either a default value in the column definition or CubeCart failing an INSERT as not having provided a value for that column. The 'discount_type' can hold any two characters, but CubeCart uses 'f', 'p', and maybe 'pp', for "Fixed (per-product sale price)", "(global) Percent", and maybe some form of other Percent that I have no experience with. Empty or Null is that this order had no discounts applied. NO_ENGINE_SUBSTITUTION, if you haven't found out yet, is a setting for the database server that prevents a table from being created or altered if the table is to be created using a specified engine that is not enabled or allowed. See: https://dev.mysql.com/doc/refman/8.0/en/sql-mode.html#sqlmode_no_engine_substitution For example, if InnoDB is not allowed, but MyISAM is, the table will not be created if the CREATE statement says to use InnoDB. With this setting disabled, the table will be created but will use MyISAM (the server default) instead. Link to comment Share on other sites More sharing options...
ducky77ar Posted December 5, 2018 Author Share Posted December 5, 2018 correct! thank you for your help, as always. it works correctly now, I have no idea why those records with 'f' in discount were locked... very strange, but i believe it's a bug with Access as usual. Thank you again. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.