Stored procedure problem

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.
 
T

Tim Ferguson

(e-mail address removed) (swyatt) wrote in
I created this stored procedure that does not work when I call it in
VBA

Try m.p.a.adp.sqlserver -- they know everything about triggers there!

All the best


Tim F
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top