Solved

sp_oacreate OLE object creation

Posted on 2004-09-13
4
646 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
Using examples as well as descriptions, and references to Books Online, show the documentation available for date manipulation functions and by using a select few of these functions, show how date based data can be manipulated with these functions.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.

737 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