S
swyatt
I created this stored procedure that does not work when I call it in
VBA
CREATE PROCEDURE [close_FEEDBACK]
(@TRACKING_ID_1 [char],
@STATUS [char](10)
AS UPDATE [CUSTFEEDBACK].[dbo].[FEEDBACK]
SET [STATUS] = @STATUS
WHERE
( [TRACKING_ID] = @TRACKING_ID_1)
GO
Code:
-------------------------------------------------------------------------------
Private Sub cmdTestUpd_Click()
Dim cmdUpdate As New ADODB.Command
Dim con As New ADODB.Connection
Dim cmdtext As String
Dim lngCount As Long
con.ConnectionString = CurrentProject.BaseConnectionString
con.Open
With cmdUpdate
.CommandText = "close_FEEDBACK"
.CommandType = adCmdStoredProc
.NamedParameters = True
.Parameters.Append .CreateParameter("@TRACKING_ID_1", adChar,
adParamInput, 9)
.Parameters.Append .CreateParameter("@STATUS", adChar,
adParamInput, 10)
.ActiveConnection = con
End With
cmdUpdate.Execute lngCount, Array(Me.TRACKING_ID.Value,
Me.STATUS.Value)
con.Close
MsgBox lngCount
End Sub
-------------------------------------------------------------------------------
When I just write a text update query it works fine.
I receive no errors, the record just doesn't get updated.
Any thoughts or suggestions are appreciated.
VBA
CREATE PROCEDURE [close_FEEDBACK]
(@TRACKING_ID_1 [char],
@STATUS [char](10)
AS UPDATE [CUSTFEEDBACK].[dbo].[FEEDBACK]
SET [STATUS] = @STATUS
WHERE
( [TRACKING_ID] = @TRACKING_ID_1)
GO
Code:
-------------------------------------------------------------------------------
Private Sub cmdTestUpd_Click()
Dim cmdUpdate As New ADODB.Command
Dim con As New ADODB.Connection
Dim cmdtext As String
Dim lngCount As Long
con.ConnectionString = CurrentProject.BaseConnectionString
con.Open
With cmdUpdate
.CommandText = "close_FEEDBACK"
.CommandType = adCmdStoredProc
.NamedParameters = True
.Parameters.Append .CreateParameter("@TRACKING_ID_1", adChar,
adParamInput, 9)
.Parameters.Append .CreateParameter("@STATUS", adChar,
adParamInput, 10)
.ActiveConnection = con
End With
cmdUpdate.Execute lngCount, Array(Me.TRACKING_ID.Value,
Me.STATUS.Value)
con.Close
MsgBox lngCount
End Sub
-------------------------------------------------------------------------------
When I just write a text update query it works fine.
I receive no errors, the record just doesn't get updated.
Any thoughts or suggestions are appreciated.