更新SQL表不工作

我不知道为什么VBA更新更改为SQL表不工作。我有一个button在我的电子表格的顶部更新logging。

存储的过程正在更新。 但是,通过excel完成后,它不会更新。请检查。

Sub Employee_Button2_Click() Dim sBackupUpdQry As String Dim sUpdQry As String Dim iRows As Integer Dim qryUpdateArray(4000) As String Dim iCols As Integer On Error GoTo ErrHandler Dim lLastRow As Long Dim lLastCol As Integer lLastRow = Cells.Find("*", Range("A3"), xlFormulas, , xlByRows, xlPrevious).Row ' Find the last row with data lLastCol = Cells.Find("*", Range("A3"), xlFormulas, , xlByColumns, xlPrevious).Column ' Find the last column with data Dim iRecCount As Integer With Sheets("Select and Update Employee") sBackupUpdQry = "EXEC usp_UpdateEmployee_FTE" iRows = 3 iRecCount = 1 For iRecCount = 1 To lLastRow - 3 iRows = iRows + 1 sUpdQry = "" sUpdQry = sUpdQry + " , @GroupingParm = '" + CStr(Cells(iRows, 3)) + "'" sUpdQry = sUpdQry + " , @CCNumParm = '" + CStr(Cells(iRows, 4)) + "'" sUpdQry = sUpdQry + " , @CCNameParm = '" + CStr(Cells(iRows, 5)) + "'" sUpdQry = sUpdQry + " , @ResTypeNumParm = '" + CStr(Cells(iRows, 6)) + "'" sUpdQry = sUpdQry + " , @ResNameParm = '" + CStr(Cells(iRows, 7)) + "'" sUpdQry = sUpdQry + " , @StatusParm = '" + CStr(Cells(iRows, 8)) + "'" sUpdQry = sBackupUpdQry + " @EmpIDParm = '" + CStr(Cells(iRows, 1)) + "' " + " , @ENameParm = '" + CStr(Cells(iRows, 2)) + "' " + sUpdQry qryUpdateArray(iRecCount) = sUpdQry 'oConn.Execute qryUpdateArray(iRecCount) Next iRecCount End With Call DBConnection.OpenDBConnection Dim rsMY_Resources As ADODB.Recordset Set rsMY_Resources = New ADODB.Recordset Dim cntUpd As Integer cntUpd = 0 For iRecCount = 1 To lLastRow - 3 If qryUpdateArray(iRecCount) > "" Then oConn.Execute qryUpdateArray(iRecCount) cntUpd = cntUpd + 1 End If Next iRecCount Call DBConnection.CloseDBConnection MsgBox ("Employee_FTE has been updated") Exit Sub ErrHandler: MsgBox (Error) End Sub