There are some inherent issues with using OLE Automation, the most important being that the code runs within the context of the SQL Server service. If something crashes, it brings down the entire SQL Server service.
A better option would be to use a SQL CLR function or stored procedure.
Would you be comfortable translating this to a SQL CLR function or stored procedure, perhaps using VB or C#?
commented on Dec 30 2011 10:38AM