I have a problem executing the following Stored Procedure from code.
The SP Text runs like this:
ALTER PROCEDURE prc_InsertContr actDirectStatus *_tmp
@var_ContractID VARCHAR(50)
insert into tblContractAudi tHistory (ContractID)
VALUES (@var_ContractI D)
The VB code which calls the procedure runs like this:
Dim adoRs As ADODB.Recordset
Dim adoCmd As ADODB.Command
Dim adoPm As ADODB.Parameter
Dim strContractID As Variant
Dim strContractStat us As Variant
Set adoCmd = New ADODB.Command
With adoCmd
.ActiveConnecti on = strConnection
Set adoPm = .CreateParamete r("ContractID ", adVariant, adParamInput,
, strContractID)
.Parameters.App end adoPm
.CommandText = "prc_InsertCont ractDirectStatu *s_tmp"
.CommandType = adCmdStoredProc
adoCmd.Execute
End With
However i get the following error message:
Type name is invalid.
Error code : -2147217872
Any ideas as to why this is happening?