Question : Execute only select sql

Hi all

 I have a text box where the user cut and paste sql and execute the sql. but i have to allow them to execute only the select sql and nothing else (no delete or edit in particular). how to do this efficiently.

Answer : Execute only select sql

You can create two diferent users on the database. One with only read rights and another with delete and add records. Use a connection with the user for read only and use this connection to execute from the textbox entered for user. Of course it's a good idea also to parse the text and check if it starts with "SELECT " as I pointed before.

Regards.
Random Solutions  
 
programming4us programming4us