My first adp project.
I have the following proc:
Public Sub TestIt()
Dim cnn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim p1 As Parameter, p2 As Parameter, p3 As Parameter, p4 As Parameter
Set cnn = CurrentProject.Connection
Set cmd.ActiveConnection = cnn
cmd.CommandText = "dbo.ud_add_tracking_record"
cmd.CommandType = adCmdStoredProc
Set p1 = cmd.CreateParameter("Employee", adSmallInt, adParamInput)
cmd.Parameters.Append p1
p1.Value = [Forms]![frmTest].[cmbEmployee]
cmd.Execute
End Sub
It stops on the Set p1 line and tells me that there is a type mismatch. I cannot figure out what it is complaining
about. I have the ActiveX Data Objects 2.6 Library loaded.
I have the following proc:
Public Sub TestIt()
Dim cnn As New ADODB.Connection
Dim cmd As New ADODB.Command
Dim p1 As Parameter, p2 As Parameter, p3 As Parameter, p4 As Parameter
Set cnn = CurrentProject.Connection
Set cmd.ActiveConnection = cnn
cmd.CommandText = "dbo.ud_add_tracking_record"
cmd.CommandType = adCmdStoredProc
Set p1 = cmd.CreateParameter("Employee", adSmallInt, adParamInput)
cmd.Parameters.Append p1
p1.Value = [Forms]![frmTest].[cmbEmployee]
cmd.Execute
End Sub
It stops on the Set p1 line and tells me that there is a type mismatch. I cannot figure out what it is complaining
about. I have the ActiveX Data Objects 2.6 Library loaded.