Private Sub Combozk_Change() If Combozk.Text = trim("是") Then txtje.Locked = False End Sub 刚刚入门。上面的代码麻烦帮我看看。 有什么问题??
有问题 差一个end ifIf Combozk.Text = trim("是") Then txtje.Locked = False End Sub end if或者是 If Combozk.Text = trim("是") Then txtje.Locked = False End Sub总之不要是 If Combozk.Text = trim("是") Then txtje.Locked = False End Sub
用另外一个cn就可以嵌套了吧? 不要用启动事务的cn来查询
查询使用事务意义不大 cn.BeginTrans set rs=cn.execute("select * from t") cn.CommitTrans没有事么区别,加上begintrans,committrans即可
Combozk.Text = trim("是") 这句话好象执行起来没有效果??
为什么我在查询事务中这样就出错呢: cn.BeginTrans set rs=cn.execute("select * from t") SET RS=CN.EXECUTE("SELECT ...") cn.CommitTrans系统提示: Cannot create new connection because in manual or distributed transaction mode. 请问是怎么会事呢,怎么解决?
cn.BeginTrans
cn.execute "update...."
cn.execute "insert..."
cn.CommitTrans而具体的查询如何写呢
If Combozk.Text = trim("是") Then
txtje.Locked = False
End Sub
刚刚入门。上面的代码麻烦帮我看看。
有什么问题??
差一个end ifIf Combozk.Text = trim("是") Then
txtje.Locked = False
End Sub
end if或者是
If Combozk.Text = trim("是") Then txtje.Locked = False End Sub总之不要是
If Combozk.Text = trim("是") Then
txtje.Locked = False
End Sub
不要用启动事务的cn来查询
cn.BeginTrans
set rs=cn.execute("select * from t")
cn.CommitTrans没有事么区别,加上begintrans,committrans即可
这句话好象执行起来没有效果??
cn.BeginTrans
set rs=cn.execute("select * from t")
SET RS=CN.EXECUTE("SELECT ...")
cn.CommitTrans系统提示:
Cannot create new connection because in manual or
distributed transaction mode.
请问是怎么会事呢,怎么解决?
直接写没有问题
参考
http://www.china-askpro.com/msg23/qa37.shtml
小弟还有一个问题想请教:
SQL SERVER中有资料资源锁定粒度(行,页,表...)等的锁定如:
select * from table with (tablock)
用于SELECT语名执行过程中对整个表的共享锁定,从而防止其他用户的更新访问。
但我也在网上看到其它网友说用悲观锁定
如:
rs,open "select * from table",adopenstatic,adlockpessimistic
请问这两种方法有什么区别和联系。谢谢
rs.open "select * from table",cn,adopenstatic,adlockpessimistic
select * from table with (tablock)