Is there any way I can determine if the query is truly safe? My current
IsQuerySafe(string)
method
That rather sounds like The Halting Problem...., but
Essentially, I want to only allow select queries
Use a different database login (ie. connection string) that has only read access. Any attempt to perform a modification will be an access violation. (On SQL Serve a user with just db_datareader
role would do it on the relevant database, and no access at all to others.)