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)
 Passing Parameters to Extended Stored Procedures

Author  Topic 

graylinc
Starting Member

6 Posts

Posted - 2004-07-20 : 16:18:34
I'm trying to pass parameters to an extended stored procedure, to no
avail. I would like to pass two integers to the dll and I have the
following three snippets:

1. The C++ portion of the dll:
...
declspec(dllexport) int myAddNumbers(int m, int n)
...

2. The creation of the extended stored procedure:
EXEC sp_addextendedproc myAddNumbers , 'foodll.dll';

3. The usage:
create function TestFunction()
returns integer
as
begin
declare @rc integer
exec @rc = myAddNumbers
return (@rc)
end

How do any of the above three things need to be modified in order to
make this work?

Thanks!!!
   

- Advertisement -