Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
mfemenel
Professor Frink
1421 Posts |
Posted - 2004-06-01 : 20:42:23
|
| Has anyone messed around with this SQL DMO command? I'm stuck on something which I'm sure is stupid. If I execute this:EXEC @hr = sp_OAMethod @object, 'ExecuteWithResultsAndMessages2', @results OUT, api_setProgramList2, @msgs OUTI get my default result set back. The problem is that api_setProgramList2 requires 2 parameters and I can't for the life of me get the syntax right. So, I'm messing around with hard coded variables for now tryint to get it right. I've done a lot of other combinations, but look below and you'll see what I'm trying to do. Could use a life line if anyone has done this before.EXEC @hr = sp_OAMethod @object, 'ExecuteWithResultsAndMessages2', @results OUT, 'api_setProgramList2(''n'',46)', @msgs OUTMike"oh, that monkey is going to pay" |
|
|
mfemenel
Professor Frink
1421 Posts |
Posted - 2004-06-01 : 21:00:32
|
| D'oh. Of course as soon as I post the question, I figured it out. Here's the answer. At the top of my stored procedure, I accept 2 input parameters, then create my sqlstringset @mystring='api_setProgramList2 @override=''' + @inputparam1 + ''',@program_id=' + cast(@inputparam2 as varchar(20))Then I call it like this:EXEC @hr = sp_OAMethod @object, 'ExecuteWithResultsAndMessages2', @results OUT, @mystring, @msgs OUTMike"oh, that monkey is going to pay" |
 |
|
|
mohdowais
Sheikh of Yak Knowledge
1456 Posts |
Posted - 2004-06-02 : 00:54:54
|
Good to see you again, Prof. And also glad to see that SQLTeam hasn't lost its powers of self-enlightenment, yet OS |
 |
|
|
|
|
|
|
|