sp_oacreate OLE object creation


I want to call a dll from a SQL stored procedure, and I'm going to create an OLE object to do this.
So for the procedure sp_OACreate where should I place the dll file, so that it can be found or how can I specify a path. Let say the dll is called temp.dll
Who is Participating?
jdlambert1Connect With a Mentor Commented:
The way you "register" dll's with SQL Server is with sp_addextendedproc:

sp_addextendedproc 'xp_hello', 'xp_hello.dll'
But an extended proc has to be created to work with SQL Server--you can't simply register any DLL as an extended proc.

skyrise11, as long as the DLL is registered on the server, the location shouldn't matter.  You just need to make sure that all the dependencies you DLL needs (if any) can be found by it.
arbertConnect With a Mentor Commented:
Maybe I should rephrase that....You can register the DLL as a stored proc (even if it doesn't exist), but if anyone ever calls it and it's not SQL friendly it could be a bad thing....
skyrise11Author Commented:
I C. It does seem a bit involved after looking into it.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.