I have a c# winform application that uses SQL 2005 Express. The application is typically deployed on home computers and laptops.
The user can purchase more content for their database from my web server.
When they do this, I want to let the user update their database by running an SQL script stored on my web server; however, I want to do this in a way that does not make it easy for the user to copy the script file to the Internet to let other users freely download it (for example, I don't want to simply let user download the SQL script to their desktop).
My current strategy: When the user purchases content they are e-mailed a key code and then they open my application and enter that key code into a text box and click a button that runs a stored procedure that communicates with (connects to) my web server and somehow runs the SQL script.
My current problem: I don't know what the code in this stored procedure should look like. Can anyone point me toward a good example of how to do this (with code examples--I need code examples). And what search terms should I use to google around for more examples.
I do not have SQL on my web server. My application is not an ASP.NET application.
Also, please let me know if there is a better way to go about updating the user's database (as I am rather ignorant about SQL).