?
Solved

sp_oacreate OLE object creation

Posted on 2004-09-13
4
Medium Priority
?
652 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 1000 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 1000 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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
It is possible to export the data of a SQL Table in SSMS and generate INSERT statements. It's neatly tucked away in the generate scripts option of a database.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Suggested Courses

765 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