Showing posts with label hihow. Show all posts
Showing posts with label hihow. Show all posts

Sunday, February 12, 2012

API functions

hi
How can I use an API function in a stored procedure in sql server 2000?
tanxHi
Not directly! You may call a COM object using the sp_OA* procedures or write
an extended stored procedure. Depending on what you may want to do there may
be a procedure that already provides the functionality or an alternative
method of untaking the task.
John
"mtgoli" wrote:

> hi
> How can I use an API function in a stored procedure in sql server 2000?
> tanx|||
"John Bell" wrote:
> Hi
> Not directly! You may call a COM object using the sp_OA* procedures or wri
te
> an extended stored procedure. Depending on what you may want to do there m
ay
> be a procedure that already provides the functionality or an alternative
> method of untaking the task.
> John
>
> "mtgoli" wrote:
>
Dear John
Can u please introduce som references about using COM object in sql? I've
never worked with COM object.
tanx|||Hi
This is an example:
http://msdn.microsoft.com/library/d...r />
_2ktw.asp
Searching for sp_OACreate on msdn.microsoft.com or google should turn
up more!
John

API function

Hi
How can I use an API function in a stored procedure in sql server 2000?2 ways. First you can write a wrapper in C and compile it into a DLL and bring it into SQL as an extended stored procedure (see examples in BOL). Second, if an API belongs to an ActiveX/COM object, - you can use it directly through sp_OAxxx. If it doesn't, - write a wrapper in C++ or VB and compile it into an ActiveX component.