views:

10

answers:

1

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).

A: 

They could create a user with limited rights (e.g. insert only) and you could provide them with a page where they can fill in their database info (URL, username, password). You connect to their database and insert your stuff.

thelost