
Strange ADE Class module error
I've got a very strange anomally when compiling my ADP to an
ADE.............
I have a class module which I use for getting data in and out of forms, and
within that is a function which starts a ADODB.command, sets the properties,
and a parameter
and executes it. See below (where lngRef is the ID value):
*****Exerpt*****
Set cnn = CurrentProject.Connection
Set cmd = New ADODB.Command
Set rst = New ADODB.Recordset
'set the command object properties
With cmd
.CommandType = adCmdStoredProc
.CommandText = mspSelectRecord
.ActiveConnection = cnn
End With
Set prm = cmd.CreateParameter("prm", adInteger, adParamInput, ,
lngRecID)
cmd.Parameters.Append prm
cmd.Execute
*****End*****
(mspSelectRecord / lngRecID are properties of the class and evaluate to
proc_Name and a ID value)
The problem seems to occur (I've deduced) at the .Execute line and returns
an ado error of -2147217900.
However this works fine in a ADP but once I compile it to a ADE, it falls
over on te .Execute line.
Help please !!!!!
Alex Stevens, England