I've got a script (batch) and a table in a database (Microsoft sql server). I need them to work together.
Script collects data from the database and uses it to call an external program which prints labels with the data collected from the table and the external program into pdf.
On every insert to the table, I want the script to run using one of the fields from the insert as a parameter.
Example:
INSERT INTO table1
VALUES (value1, value2, value3);
So then I want the script to run like: Script.bat value1
I've been told triggers are not the best option because if there's any error during the trigger the insert won't be made.
Hope you can help me!