By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,903 Members | 1,922 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,903 IT Pros & Developers. It's quick & easy.

CSharp Extended Stored Procedure in SQLServer 2000

P: n/a
Hi. I have some functionality in a C# DLL that I would like to be able
to call from inside SQLServer. I know this was possible in C++, using
an Extended Stored Procedure, but I haven't been able to find a similar
process for C#. Does anyone know if such an animal exists?

I believe I could call the C# routines from within a C++ extended
stored procedure wrapper, but I stink as a C++ programmer (pointers?
what?) and don't want to learn C++ if at all possible. Maybe there's a
way to register a COM component in SQLServer and call the routines?

Thanks in advance for any help ...

-m-

Nov 17 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Hmm, on 2nd thought there may be no help. This tells me that I won't be
able to call on any C# (well, any CLR) code from withing SQL2k:

http://support.microsoft.com/default...b;en-us;322884

Found that link over on the sqlserver.programming group. I'd love to
find out if I'm wrong here!

-m-

Nov 17 '05 #2

P: n/a

Well, with SQL Server 2005 you'll be able to use all the C# code you want
:-)

Regards - Octavio

<ic******@gmail.com> escribió en el mensaje
news:11**********************@g49g2000cwa.googlegr oups.com...
Hmm, on 2nd thought there may be no help. This tells me that I won't be
able to call on any C# (well, any CLR) code from withing SQL2k:

http://support.microsoft.com/default...b;en-us;322884

Found that link over on the sqlserver.programming group. I'd love to
find out if I'm wrong here!

-m-

Nov 17 '05 #3

P: n/a
<ic******@gmail.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Hi. I have some functionality in a C# DLL that I would like to be able
to call from inside SQLServer. I know this was possible in C++, using
an Extended Stored Procedure, but I haven't been able to find a similar
process for C#. Does anyone know if such an animal exists?

I believe I could call the C# routines from within a C++ extended
stored procedure wrapper, but I stink as a C++ programmer (pointers?
what?) and don't want to learn C++ if at all possible. Maybe there's a
way to register a COM component in SQLServer and call the routines?

Thanks in advance for any help ...

-m-


According to Microsoft, using .Net assemblies from SQL 2000 is not
supported. However it is in fact possible...

If you register your C# DLL for use via COM then you can make use of it's
methods and properties via OLE automation extended stored procedures
(sp_OACreate, etc..). At work, we have a DLL written in C# that we use just
like this on SQL 2000. We use it for data conversion purposes, in our
development environment only, wouldn't recommend it for production.

CVD
Nov 17 '05 #4

P: n/a
> Well, with SQL Server 2005 you'll be able to use all the C# code you want

True, true. but I doubt the client wants to pay to retrain all of their
DBAs to be able to support SQL2k5 just yet. :) Me, I'm psyched, but
production 2k5 apps will have to wait a bit ...

-m-

Nov 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.