SQL scripts contained in EXE

0

I have this scenario, a set of several scripts that I need are contained in the EXE to avoid modifications on the part of the user and that are:

1) creation of the database 2) inserts of the teachers 3) inserts of the test data

When executing, errors should be returned, if any, in some variable and then interpreted, not in an output file but in a variable that will be sent to me by email through the application.

I've been testing with process.start () and everything else, but the output sends it to a text

Is there a way to make the errors return them in the program variable?

Thanks

    
asked by Marco Antonio Garcia Leon 11.11.2017 в 09:34
source

1 answer

0

A better solution than saving the script in the executable is to save it in the database as a stored procedure, in this way you can execute them without having them inside the exe.

    
answered by 11.11.2017 в 20:13