Hi,
For some obscure reason I need to use ADO.
As I learned, I can execute a stored querydef with a parameter in ADO like this:
cmd.CommandText = "[InstrumentDeleteEmptyQuads]"
Set rst = cmd.Execute(, Array(CurrentInstrumentID), adCmdStoredProc)
So far, so good...
But when I have a SQL statement in VBA that refers to a stored querydef that requires a parameter, I have no ide how to pass that parameter, since I am not executing that stored querydef directly from VBA, only the sql string that I execute refers to it.
Should I try to pass the parameter to the Sql string that I execute - how to do that? -, or to the stored querydef without executing it - again, how to do that?
Thanks for any help.
SWK
For some obscure reason I need to use ADO.
As I learned, I can execute a stored querydef with a parameter in ADO like this:
cmd.CommandText = "[InstrumentDeleteEmptyQuads]"
Set rst = cmd.Execute(, Array(CurrentInstrumentID), adCmdStoredProc)
So far, so good...
But when I have a SQL statement in VBA that refers to a stored querydef that requires a parameter, I have no ide how to pass that parameter, since I am not executing that stored querydef directly from VBA, only the sql string that I execute refers to it.
Should I try to pass the parameter to the Sql string that I execute - how to do that? -, or to the stored querydef without executing it - again, how to do that?
Thanks for any help.
SWK