September 6, 2012 at 1:51 pm
I just learned about MAX_ODSOLE_OBJECTS. I traced your code and it looks like you're destroying all your created objects, i.e. no leaks, but it is quite odd that you;re dying on the call to sp_OAMethod and not on an spOA_Create.
Some relevant links:
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=82456
http://mssql.meetholland.com/message/30123.aspx
May I suggest that you convert this code to use SQLCLR?
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
September 6, 2012 at 6:18 pm
Perhaps I'm misunderstanding something obvious but I don't understand why someone is building ADO result sets using loops, dynamic sql, and OLE Automation for this. It seems like a SELECT statement with correct criteria and a CASE statement or two would more easily solve this problem not to mention being infinitely more scalable or being much, much faster.
--Jeff Moden
Change is inevitable... Change for the better is not.
September 7, 2012 at 2:11 am
Ole is used as the data records are coming from various remote servers which are not able to be linked to our database. The code example here is a specific implementation made by the coder. The actual COM+ object itself is of course more generic and does more than running a simple dynamic query
September 7, 2012 at 2:13 am
Thanks for the links and your time.. Our com+ object is old school C++ and will shortly be upgraded to c# or vb in the CLR. We will rework the code for this problem and shift the COM+ calls to the application and lift it out of the database for the time being.. Thanks for the comments
Viewing 4 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply