I have a program that will run on several machines. I cannot control exactly which machines this program will be running on, but all will link to the same database that is located on a server somewhere.
The program might require to run a script that is recevied in the form of a .sql text file.
Currently, the program is starting osql with the proper parameters to run this script, and that works fine.
However, some machines running this program do not have MS SQL Server (or Express), so osql is not possible to run on that machine.
I can't control which machines will run this, or force the owner of those machines to install MS SQL Express, so I need one of the following:
Find a replacement to
osql
that I can distribute alongside my program, and use to run the script.Use a builtin function inside C# to run the script from file. I have tried reading the file and running command by command on the SQL server but that is way to slow ( the script file might be really big in some cases)
Thanks in advance.