红袍老师, 我是直接把SQL语言定义为函数,然后直接使用,这个会有问题吗?
例如
定义函数
Dim dt As DataTable
Dim name As String=args(0)'要加载的表名
Dim Bool As Boolean=args(1)'只读还是可以编辑
Dim flt As String=args(2)'只筛选条件
cmd99.CommandText = "Select * F rom {"& name &"} where "& flt &""
dt = cmd99.ExecuteReader(bool)
Return dt
然后 每次就不写 直接写
dim dt as datatable=Functions.Execute("函数 ","表A",0,“1=1”)