Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 SQL SERVER

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-11-08 : 08:05:59
ss writes "How to Configure in sql server to make a call to a DLL in a Stored Procedure.Can u give me a sample code"

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2006-11-08 : 08:27:08
quote:
sp_addextendedproc
Registers the name of a new extended stored procedure to Microsoft® SQL Server™.

Syntax
sp_addextendedproc [ @functname = ] 'procedure' ,
[ @dllname = ] 'dll'

Arguments
[ @functname = ] 'procedure'

Is the name of the function to call within the dynamic-link library (DLL). procedure is nvarchar(517), with no default. procedure optionally can include the owner name in the form owner.function.

[ @dllname = ] 'dll'

Is the name of the DLL containing the function. dll is varchar(255), with no default.

Return Code Values
0 (success) or 1 (failure)

Result Sets
None

Remarks
Programmers using Microsoft Open Data Services can create extended stored procedures. After an extended stored procedure is created, it must be added to SQL Server using sp_addextendedproc. For more information, see Creating Extended Stored Procedures.

Only add an extended stored procedure to the master database. To execute an extended stored procedure from a database other than master, qualify the name of the extended stored procedure with master.

sp_addextendedproc adds entries to the sysobjects table, registering the name of the new extended stored procedure with SQL Server. It also adds an entry in the syscomments table.

Permissions
Only members of the sysadmin fixed server role can execute sp_addextendedproc.

Examples
This example adds the xp_hello extended stored procedure.

USE master
EXEC sp_addextendedproc xp_hello, 'xp_hello.dll'


See Also

EXECUTE

GRANT

REVOKE

sp_dropextendedproc

sp_helpextendedproc

System Stored Procedures


Peter Larsson
Helsingborg, Sweden
Go to Top of Page
   

- Advertisement -