S
smk23
I would like to return a recordset from a stored procedure using the cmd
object:
Set mCmd = New ADODB.Command
With mCmd
.ActiveConnection = mConn
.CommandText = SelectCommandText
.CommandType = adcmdStoredProc
Set mrst = New ADODB.Recordset
Set mrst = .Execute
I get an error "syntax error or access violation" when I try to execute. I
have code that checks whether mConn is open prior to this and it is. When I
take the .CommandText and run it in Query Analyzer, it executes fine. What
can I do to determine what the issue is?
Thanks so much!
object:
Set mCmd = New ADODB.Command
With mCmd
.ActiveConnection = mConn
.CommandText = SelectCommandText
.CommandType = adcmdStoredProc
Set mrst = New ADODB.Recordset
Set mrst = .Execute
I get an error "syntax error or access violation" when I try to execute. I
have code that checks whether mConn is open prior to this and it is. When I
take the .CommandText and run it in Query Analyzer, it executes fine. What
can I do to determine what the issue is?
Thanks so much!