如何在Gridview的行的基础上形成Where子句 [英] How to form Where clause on the basis of Gridview' rows

查看:153
本文介绍了如何在Gridview的行的基础上形成Where子句的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何根据gridview的行和单元格值形成Where子句,并且在gridview用户中可以根据需要添加任意数量的行。那么我如何根据gridview的行值形成where子句。

How to form a Where Clause on the basis of gridview's rows and cell values & in a gridview user can add as many rows as he want. so how can i form where clause on the basis of gridview's row values.

推荐答案

字符串混淆SQL的任何代码都是错误的。如果必须的话,最好的方法是编写一个在SQL Server中使用XML对象的proc,或者如果你在2005年使用OpenXML,从你传入的数据中创建一个临时表,然后处理它从那里。
Any code that string mashes SQL, is bad. The best way to do it, if you must, is to write a proc that uses the XML object in SQL Server, or OpenXML if you're in 2005, to create a temp table from the data you passed in, and then processes it from there.


这篇关于如何在Gridview的行的基础上形成Where子句的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆