Hi,
I'm trying to call a stored procedure from AccessXP, that has a input parameter. The stored procedure has one input parameter @EventRef. This is what I have so far but the error message is Automation Error Unspecified Error -2147467259. Any ideas?
Dim EventRef As Integer
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim cmd As ADODB.Command
Set conn = New ADODB.Connection
conn.Open ConnectionString
Set rs = New ADODB.Recordset
Set cmd = New ADODB.Command
With cmd
.CommandType = adCmdStoredProc
.CommandText = "MailEvent"
.Parameters.Append cmd.CreateParameter("EventID", adNumeric)
.Parameters("EventID"
.Value = EventRef
.ActiveConnection = conn
End With
Set rs = cmd.Execute
I'm trying to call a stored procedure from AccessXP, that has a input parameter. The stored procedure has one input parameter @EventRef. This is what I have so far but the error message is Automation Error Unspecified Error -2147467259. Any ideas?
Dim EventRef As Integer
Dim conn As ADODB.Connection
Dim rs As ADODB.Recordset
Dim cmd As ADODB.Command
Set conn = New ADODB.Connection
conn.Open ConnectionString
Set rs = New ADODB.Recordset
Set cmd = New ADODB.Command
With cmd
.CommandType = adCmdStoredProc
.CommandText = "MailEvent"
.Parameters.Append cmd.CreateParameter("EventID", adNumeric)
.Parameters("EventID"
.ActiveConnection = conn
End With
Set rs = cmd.Execute