Dim st1 As Date = Date.Now
Dim strlist As List(Of String) = Functions.Execute("sql提取函数",Tables("学生信息"),"学生信息","_Identify","[_Identify]","学校名称|学生姓名|学籍号|身份证件号|性别|民族|家庭住址|联系电话|班级|年级|政治面貌|健康状况|就读方式|邮政编码|综合素质|状态|户口性质|出生日期","学校名称|学生姓名|学籍号|身份证件号|性别|民族|家庭住址|联系电话|班级|年级|政治面貌|健康状况|就读方式|邮政编码|综合素质|状态|户口性质|出生日期",1)
Dim sql As String
Dim cmd As New SQLCommand
cmd.C
Dim Count As Integer = 0
try
Connections("180.153.108.50").BeginTransaction
For Each s As String In strlist
cmd.CommandText = s
Count += cmd.ExecuteNonQuery()
Next
Connections("180.153.108.50").Commit '提交事务,所有操作生效
Catch ex As Exception '如果出错
msgbox(ex.message)
Connections("180.153.108.50").Rollback() '回滚事务,撤销所有操作
End Try
Tables("学生信息").DataTable.BaseTable.AcceptChanges() '提交修改
MessageBox.Show("亲,我正在为节省您的每一秒钟努力,本次保存共耗时: " & (Date.Now - st1).TotalSeconds & "秒")
记录修改后保存提示:“#”附近有语法错误,且保存无效