Solved

sp_oacreate OLE object creation

Posted on 2004-09-13
4
638 Views
Last Modified: 2008-03-17
Hi,

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
0
Comment
Question by:skyrise11
  • 2
4 Comments
 
LVL 15

Accepted Solution

by:
jdlambert1 earned 250 total points
ID: 12050091
The way you "register" dll's with SQL Server is with sp_addextendedproc:

sp_addextendedproc 'xp_hello', 'xp_hello.dll'
0
 
LVL 34

Expert Comment

by:arbert
ID: 12051006
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.
0
 
LVL 34

Assisted Solution

by:arbert
arbert earned 250 total points
ID: 12051594
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....
0
 

Author Comment

by:skyrise11
ID: 12070195
I C. It does seem a bit involved after looking into it.

0

Featured Post

Ransomware-A Revenue Bonanza for Service Providers

Ransomware – malware that gets on your customers’ computers, encrypts their data, and extorts a hefty ransom for the decryption keys – is a surging new threat.  The purpose of this eBook is to educate the reader about ransomware attacks.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you hear the word proxy, you may become apprehensive. This article will help you to understand Proxy and when it is useful. Let's talk Proxy for SQL Server. (Not in terms of Internet access.) Typically, you'll run into this type of problem w…
Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to shrink a transaction log file down to a reasonable size.

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now