用于表格数据保存时,使用Sql语句直接保存的时候,自动生成 删除,新增,修改语句
此主题相关图片如下:jdfw.gif
测试命令
Dim strlist As List(Of String) = Functions.Execute("sql提取函数",Tables("客户"),"客户","ID","ID","客户ID|客户名称|日期列|_shishi|逻辑列","客户ID|客户名称|日期列|_shishi|逻辑列",1)
If strlist.count = 0 Then Return Nothing
Dim sql As String
Dim cmd As New SQLCommand
cmd.C
Dim Count As Integer = 0
For Each s As String In strlist
cmd.CommandText = s
Count += cmd.ExecuteNonQuery()
Output.show(s)
Next
Tables("客户").DataTable.BaseTable.AcceptChanges() '提交修改
Tables("客户").DataTable.Load '刷新表
Output.show("影响了" & Count & "行")
以下内容只有回复后才可以浏览