Solved

sp_oacreate OLE object creation

Posted on 2004-09-13
4
634 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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Viewers will learn how to use the UPDATE and DELETE statements to change or remove existing data from their tables. Make a table: Update a specific column given a specific row using the UPDATE statement: Remove a set of values using the DELETE s…

708 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

15 Experts available now in Live!

Get 1:1 Help Now