在C#中评估sql语句的最佳方式是什么?(What is the best way to evaluate a sql statement in C#?)

编程入门 行业动态 更新时间:2024-10-28 12:25:26
在C#中评估sql语句的最佳方式是什么?(What is the best way to evaluate a sql statement in C#?)

评估C#中的SQL语句以确定它是否不仅仅是选择而最好的方法是什么? - 即 - 如果语句稍后执行,则检查值是否会更改(插入,更新,删除,修改或删除)。

任何想法,只要开箱C#dlls /函数我可以使用,或者这是我应该使用字符串解析技术自己编码的东西?

谢谢。

What is the best way to evaluate a SQL statement in C# to determine if it does more than just select? - Ie- check if values would be changed (insert, update, delete, modify, or drop) if the statement was later executed.

Any ideas as far as out of the box C# dlls/functions i can use, or is this something I should code myself using string-parsing techniques?

Thanks.

最满意答案

我会使用数据库权限。 创建一个只有读取访问权限的数据库用户,然后,执行除SELECT之外的任何查询都将失败。

I would use db permissions. Create a database user with read-access only and then, any queries that do anything other than SELECT will fail.

更多推荐

本文发布于:2023-07-20 11:10:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1198699.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:语句   方式   sql   evaluate   statement

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!