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.
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_addextendedprocRegisters the name of a new extended stored procedure to Microsoft® SQL Server™.Syntaxsp_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 Values0 (success) or 1 (failure)Result SetsNoneRemarksProgrammers 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.PermissionsOnly members of the sysadmin fixed server role can execute sp_addextendedproc.ExamplesThis example adds the xp_hello extended stored procedure.USE masterEXEC sp_addextendedproc xp_hello, 'xp_hello.dll'See AlsoEXECUTE GRANT REVOKE sp_dropextendedproc sp_helpextendedprocSystem Stored Procedures
Peter LarssonHelsingborg, Sweden |
 |
|
|
|
|