Hi! I have procedure on SQL Server! Now,is it possible to create dll from that procedure and if it is, how i can do that?
Thanks!
Hi! I have procedure on SQL Server! Now,is it possible to create dll from that procedure and if it is, how i can do that?
Thanks!
It is not possible to create a dll from a stored procedure - SQL Server stores the procedure internally as text (more or less), and only parses it into executable instructions on an as-needed basis.
Why is it that you wish to create a dll from a stored procedure?
Update: As I understand it you have some code written in the form of a stored procedure that you wish to be able to call from code. If this is the case then you have two options:
Option 1 is cleaner, however introduces the risk that you might not port the code correctly (and means that you may now have to maintain the same code in 2 different places - you might be able to get around this however by using CLR extensions, or re factoring your code)
Option 2 is simpler, however comes at the cost of a performance overhead, plus the added complication of ensuring that the SQL server instance is always available.
Without knowing more about what the stored procedure does my advice would probably be to go with option 1, as it will probably give you the least headaches in the long run.
No, it is not possible to create a DLL from a stored procedure.
It is possible to call a DLL (both COM and CLR), when certain options are turned on.
Perhaps you could explain what you are trying to achieve?