I am still working on an MS Access offline database system for Zencart and I am currently building the Installer into MS Access. There are one or two issues which MS Access does not like and I need to know if I can change then without introducing bugs.
For this example I need to know if removing \ from an Insert statement will affect functionality.
MySQL CODE:
INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Expected Sort Order', 'EXPECTED_PRODUCTS_SORT', 'desc', 'This is the sort order used in the expected products box.', '1', '8', 'zen_cfg_select_option(array(\'asc\', \'desc\'), ', now());
Once converted to Acess this becomes:
VBA CODE:
CurrentDb.Execute "INSERT INTO configuration (configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, set_function, date_added) VALUES ('Expected Sort Order', 'EXPECTED_PRODUCTS_SORT', 'desc', 'This is the sort order used in the expected products box.', '1', '8', 'zen_cfg_select_option(array(\'asc\', \'desc\'), ', now());"
Access has a problem with this bit:
CODE:
(array(\'asc\', \'desc\'), ', now());
In particular Access dislikes the \ because it expects a command. What is the purpose of the \ in the statement for zencart and can it be safely removed?
If not I will need to find some way of escaping the \ so Access does not complain.
Thanks for any insights
Jim
Bookmarks