开发者

OLE Automation objects

开发者 https://www.devze.com 2023-03-12 08:38 出处:网络
What is an OLE Automation object: wikipedia says: is an inter-process communication mechanism based on Component Object

What is an OLE Automation object: wikipedia says:

is an inter-process communication mechanism based on Component Object Model (COM) that was intended for use by scripting languages – originally Visual Basic – but now are used by languages run on Windows.[3] It provides an infrastructure whereby applications called automation controllers can access and manipulate (i.e. set properties off or call methods on) shared automation objects that are exported by other applications. It supersedes Dynamic Data Exchange (DDE), an older mechanism for applications to control one another.[4] As with开发者_开发百科 DDE, in OLE Automation the automation controller is the "client" and the application exporting the automation objects is the "server".

My question is:

  • Is it possible to use a C# code, (seems only C++) (wich uses several other C# includes) and call a them in a Stored Proc.

  • Is it possible to read a table with these Object?

  • Is it possible to compute things with that object, with table data? What would be the steps?


Well, if you're using MS SQL Server 2005 or later, you can set up what's called a "CLR Stored Procedure", basically written in C# and able to reference other .NET assemblies. This would remove any need to refer to a .NET assembly using COM. More info: http://msdn.microsoft.com/en-us/library/ms131094.aspx

AFAIK, COM's COM; the idea is that messages are passed at the OS level between the client code and server control, and the client doesn't have to know any specifics of the server implementation; just the "front door" interface. So, if you had to use COM, you should just be able to register your .NET assemblies for COM (the main change is just a switch in the Build tab of the project's Properties view in VS), and then use them as if they had been written in C/C++, VB, Delphi, or whatever.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号