devxlogo

SQL Feature to Integrate with COM Objects

SQL Feature to Integrate with COM Objects

SQL Server has a very powerful, but often overlooked, feature to integrate with COM objects. SQL itself can create COM objects from within Triggers or Stored Procedures, apply property values and execute methods. What you commonly see in Visual Basic, and other languages, that looks similar to:

 Set oFoo = CreateObject("Foo.cFoo")oFoo.Condition = "Quantity Low"oFoo.Responsible = "Joe Karbowski"oFoo.SendPagerMsgSet oFoo = Nothing

you can also do in SQL Server T-SQL sp_OA calls. This is especially useful if you need to take action that isn’t necessarily associated with a database, like dialing a pager or integrating to custom middleware. The power comes in the reuse of you COM components and enforcing a single set of business rules.

devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist