在vb 里写的sql语句如何返回结果,如下段代码
txtsql="BEGINTRANSACTION"txtsql=txtsql&"DECLARE@errorSumINT"txtsql=txtsql&"SET@errorS...
txtsql = "BEGIN TRANSACTION "
txtsql = txtsql & "DECLARE @errorSum INT "
txtsql = txtsql & "SET @errorSum=0 "
txtsql = txtsql & "delete from 教课信息 "
txtsql = txtsql & "WHERE 编号=Text5.Text "
txtsql = txtsql & "SET @errorSum=@errorSum+@@error "
txtsql = txtsql & "IF @errorSum<>0 "
txtsql = txtsql & "BEGIN print '删除失败' "
txtsql = txtsql & "ROLLBACK TRANSACTION "
txtsql = txtsql & "END "
txtsql = txtsql & "ELSE BEGIN "
txtsql = txtsql & "print '删除成功' "
txtsql = txtsql & "COMMIT TRANSACTION "
txtsql = txtsql & "END "
ExecuteSQL (txtsql)
如何把“删除失败”“删除结果” 反映到vb界面的控件上,比如label,需要什么函数么? 展开
txtsql = txtsql & "DECLARE @errorSum INT "
txtsql = txtsql & "SET @errorSum=0 "
txtsql = txtsql & "delete from 教课信息 "
txtsql = txtsql & "WHERE 编号=Text5.Text "
txtsql = txtsql & "SET @errorSum=@errorSum+@@error "
txtsql = txtsql & "IF @errorSum<>0 "
txtsql = txtsql & "BEGIN print '删除失败' "
txtsql = txtsql & "ROLLBACK TRANSACTION "
txtsql = txtsql & "END "
txtsql = txtsql & "ELSE BEGIN "
txtsql = txtsql & "print '删除成功' "
txtsql = txtsql & "COMMIT TRANSACTION "
txtsql = txtsql & "END "
ExecuteSQL (txtsql)
如何把“删除失败”“删除结果” 反映到vb界面的控件上,比如label,需要什么函数么? 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询