很慢好像快死机的样子 添加的时候用EXECUTE(ADDSTRING) 毫无问题 其他程序可正常运行
但是更新数据就慢了而且利用程序设定的MSGBOX提示可以更新完成
可是打开数据库看见却没有跟新database
updatesql 已经通过SQL语法检查
代码如下:
Dim sqlstr As String
Dim AoERst As New ADODB.Recordsetsqlstr = "select * from information where date='" + CStr(Format(DTPicker1.Value, "yyyy-MM-dd")) + "'"
AoERst.Open sqlstr, Conn, adOpenDynamic, adLockPessimistic
On Error Resume Next
AddRst.MoveFirst
If Err = 3021 Then
response.Write "无数据!"
End IfIf AoE = 1 Then
If AoERst.EOF And AoERst.BOF Then
Conn.Execute GetSql(True)
Rst.Requery
DataGrid1.Refresh
MsgBox CStr(Format(DTPicker1.Value, "yyyy-MM-dd")) + "数据库存储成功"
Else
MsgBox "该日数据已经存在!"
End If
End IfDim sss As String
sss = "UPDATE information SET sanlunche=12000,huangbaoche=12,qigai=12,renci=12,checi=12,memo='asd' where date='2008-04-22'"
If AoE = 2 Then
If Not (AoERst.EOF And AoERst.BOF) Then
Conn.Execute (sss)
'MsgBox CStr(Conn.Errors.Item.Number)
MsgBox "修改成功"
Else
MsgBox "没有改日数据"
End If
End If
Locktxtbox
Clstxt
AoERst.Close另外 怎么输出CONN的错误原因 EONN.ERRORS 怎么输出啊
但是更新数据就慢了而且利用程序设定的MSGBOX提示可以更新完成
可是打开数据库看见却没有跟新database
updatesql 已经通过SQL语法检查
代码如下:
Dim sqlstr As String
Dim AoERst As New ADODB.Recordsetsqlstr = "select * from information where date='" + CStr(Format(DTPicker1.Value, "yyyy-MM-dd")) + "'"
AoERst.Open sqlstr, Conn, adOpenDynamic, adLockPessimistic
On Error Resume Next
AddRst.MoveFirst
If Err = 3021 Then
response.Write "无数据!"
End IfIf AoE = 1 Then
If AoERst.EOF And AoERst.BOF Then
Conn.Execute GetSql(True)
Rst.Requery
DataGrid1.Refresh
MsgBox CStr(Format(DTPicker1.Value, "yyyy-MM-dd")) + "数据库存储成功"
Else
MsgBox "该日数据已经存在!"
End If
End IfDim sss As String
sss = "UPDATE information SET sanlunche=12000,huangbaoche=12,qigai=12,renci=12,checi=12,memo='asd' where date='2008-04-22'"
If AoE = 2 Then
If Not (AoERst.EOF And AoERst.BOF) Then
Conn.Execute (sss)
'MsgBox CStr(Conn.Errors.Item.Number)
MsgBox "修改成功"
Else
MsgBox "没有改日数据"
End If
End If
Locktxtbox
Clstxt
AoERst.Close另外 怎么输出CONN的错误原因 EONN.ERRORS 怎么输出啊
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货