4

I've got a c# class library that I call from an asp.net application. The assembly calculates grades for students and performs calculations using datatables and such.

How can I use this assembly in SQL Server 2005 and call it once for each record in a database table? I want to re-use functionality and avoid writing the thing in T-SQL.

1 Answer 1

4

To use .Net assemblies in SQL Server you need to enable CLR Integration in SQL server. This section on MSDN has some good examples.

As you have the logic already in .Net wouldn't it be better to do all the work there? As your application grows you'll be much better off keeping all you business logic in code and using the database as a store of data.

Sign up to request clarification or add additional context in comments.

1 Comment

Doesn't necessarily mean that if you have processing you have to keep it in the code. What if you use the database in that processing and you have many round trips to it and that's why you chose to process the data in the db itself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.