Data Import/Export


https://forum.kartris.com/Topic1704.aspx
Print Topic | Close Window

By snowy100 - Wed 1 Aug 2012
Hello there

I have been tasked on retrieving orders from a Kartris cart into Sage Accounts and uploading stock levels from Sage the other way.

I can extract the order data OK but receive a SQL error;

"The transaction ended in the trigger. The batch has been aborted.
ERROR:Operation not allowed by user"

However, as I said the data seems OK.

I cannot seem to upload data directly into the tables to adjust stock levels without the same error, and cannot alter the table data directly in SQL Management Studio.

I suspect that this is because the database uses its triggers on data insert/update?

So my questions are;
  1. As long as the order data is extracted OK, which it appears to be, will this have any effect on the rest of the database integrity?
  2. Is there any way of uploading data directly (stock levels) without using the data tool that you supply?
Thanks for your time and I look forward to your reply.
By Paul - Fri 3 Aug 2012
Hi Snowy100

Kartris has triggers to protect the data from casual modification. I've added a KB with more info here:

http://www.kartris.com/Knowledgebase/Trigger-errors-when-modifying-data-in-the-database-tables__k-44.aspx

So to answer your questions:

1. As long as you read the data ok, I think the trigger error shouldn't be anything to worry about
2. You can just run the sproc to disable all triggers before you run any updates on data in the tables.

Note that over time, the triggers will be reenabled as sprocs run operations on the various tables in normal usage (because the last step is always to reenable the trigger). So you will need to turn off triggers each time before your operations.
By snowy100 - Tue 4 Sep 2012
Thanks for that - I need to disable the relevant triggers on the order table in order to update the O_SentToQB field from a vb.net aspx page.
Is there a stored procedure to do this already please?
If not, what would the best way be to achieve this?

Thanks again