Calljj:
have you run the sql script to create the database?
Can you check the database does exist?
Sounds like you haven't run the script, or that the script was not allowed to add tables due to server permissions.
Hi - Ran the script, claims script ran ok with no errors.....
Here is the error when I try to export the reports from admin...
Sage file started 2011/01/18 05:57:16
Data file - /home/mammoth9/public_html/woodandknifesupply.com/sage/sage_stock_transaction.csv
Data file - /home/mammoth9/public_html/woodandknifesupply.com/sage/sage_sales_transaction.csv
1146 Table 'mammoth9_zc1.sage_update' doesn't exist
in:
[SELECT * FROM sage_update ]
- Tried it several times i.e. install and uninstall scripts....
- I've made Db script changes over the weekend for other mods....they executed ok...
- I am no alone with this......it appears that many others receive the same error where the database name is referred to as '[yourDbname].sage_update'
- Essentially the error always seems to be the name of the sage table prefixed with the name of your sql database...
- Is this error correct i.e.
- 1146 Table 'mammoth9_zc1.sage_update' doesn't exist
does indeed mean table sage_update does not exist in database masmmoth9_zc1...?
OR
does the error mean table mammoth9_zc1.sage_update does not exist (As per the actual error)....
Misleading is it not!
Mind you a table name with a full stop in the naming is interesting....
The script states 'CREATE TABLE sage_update'
When I try the following command in isolation....
CREATE TABLE sage_update
(last_update datetime);
I receive the message
ERROR: Failed 1
ERROR: Cannot create table sage_update because it already exists
Note: 1 statements ignored. See "upgrade_exceptions" table for additional details.
I am at a loss....I am no Db expert but there has to be a problem with table permissions or similar in the script, that makes a table that exist appear to not exist.
However the SAGE addon appears to ba looking for a table with a different name.
Help appreciated....
For reference below is the script...
CREATE TABLE sage_update
(last_update datetime);
Insert into sage_update Values ('0000-00-00 00:00:00');
SET @t7=0;
SELECT (@t7:=configuration_group_id) as t7
FROM configuration_group
WHERE configuration_group_title= 'SAGE';
DELETE FROM configuration WHERE configuration_group_id = @t7;
DELETE FROM configuration_group WHERE configuration_group_id = @t7;
INSERT INTO configuration_group VALUES (NULL, 'Sage Configuration', 'Set Sage Options', '1', '1');
UPDATE configuration_group SET sort_order = last_insert_id() WHERE configuration_group_id = last_insert_id();
SET @t7=0;
SELECT (@t7:=configuration_group_id) as t7
FROM configuration_group
WHERE configuration_group_title= 'Sage Configuration';
INSERT INTO configuration (configuration_id, configuration_title, configuration_key, configuration_value, configuration_description, configuration_group_id, sort_order, date_added, use_function, set_function) VALUES
(NULL, 'Output File Name', 'SAGE_OUTPUT_FILENAME', 'sage_stock_transaction.csv', 'Set the name of your sage stock output file', @t7, 1, NOW(), NULL, NULL),
(NULL, 'Output File Name', 'SAGE_OUTPUT_FILENAME2', 'sage_sales_transaction.csv', 'Set the name of your sage sales output file', @t7, 2, NOW(), NULL, NULL),
(NULL, 'Output Directory', 'SAGE_DIRECTORY', 'sage/', 'Set the name of your file output directory', @t7, 3, NOW(), NULL, NULL),
(NULL, 'Start Date', 'SAGE_STARTSDATE','2007-01-01', 'Set the start date of your output file - set to null to use last update, or date format yyyy-mm-dd', @t7, 4, NOW(), NULL, NULL),
(NULL, 'End Date', 'SAGE_ENDSDATE', 'null', 'Set the end date of your output file, or set to null for now - date format yyyy-mm-dd', @t7, 5, NOW(), NULL, NULL),
(NULL, 'Order Status', 'SAGE_STATUS',' 4', 'Set the Complete Status Number of your Order Processing to process all below this level', @t7, 6, NOW(), NULL, NULL),
(NULL, 'Transaction Code', 'SAGE_TX','GO', 'Stock Tranascation Code for Sage', @t7, 7, NOW(), NULL, NULL),
(NULL, 'Sales Code', 'SAGE_TX2','CR', 'Sales Tranascation Code for Sage', @t7, 8, NOW(), NULL, NULL),
(NULL, 'Paypal/Credit Card Nominal Code', 'SAGE_PAYPAL', '1205', 'Set the Sage Nominal code for Paypal/Credit Cards e.t.c', @t7, 9, NOW(), NULL, NULL),
(NULL, 'Bank/Cheque Nominal Code', 'SAGE_CHEQ', '1200', 'Set the Sage Nominal code for Cheques/Bank transfers e.t.c', @t7, 10, NOW(), NULL, NULL);