Public Function UpdateZL(ByVal LotNo As String, ByVal lineCode As String, ByVal TypeNo As String, ByVal MachineNo As String) As Boolean
Dim QryTemp As QueryDef
On Error GoTo Err:
Set QryTemp = MyDB.QueryDefs("QryPassThrough")
QryTemp.SQL = "exec dbo.sp_Pos_info_Update '" & LotNo & "','" & lineCode & "','" & TypeNo & "','" & MachineNo & "'"
QryTemp.ReturnsRecords = False
QryTemp.connect = QryPassThrough
QryTemp.ODBCTimeout = 0
QryTemp.Execute
UpdateZL = True
Exit Function
Err:
UpdateZL = False
Exit Function
End Function
=================================================
这样写在access中能够取到存储过程的错误代码吗?如果存储过程失败的话。如果不能够,那我应该怎样写呢?
[此贴子已经被作者于2005-6-1 14:58:07编辑过]
|