View previous topic :: View next topic |
Author |
Message |
DrTip
Joined: 01 Aug 2006 Posts: 74 Location: Manchester
|
Posted: Wed Mar 14, 2007 10:47 am Post subject: FTN95 and SQLCLR |
|
|
Hi Paul
THis is a suggestion for future development
in the lastest version of SQL Server 2005. With some effort the ability to embed C# and VB.net functions has been added. THe main use of this functionality is to have the ability to do complex mathematics on databse columns.
THis is proving to be very useful to our company at the moment. We can have C# dlls embedded on the database to do numerical modelling without having to pull data out of the server.
In principle any .net language can be used though only c# and vb are supported (by microsoft) at the moment.
ftn95.net doesn't work because ftn95.net dlls access inappropriate system dlls (like windows forms etc)
Since the main use of FTN95 is for numerics and the main use of this new functionality is numerics this seems like perfect fit to me.
I know this is probably a specialised request but I can see you could steal an important march by getting this functionality up an running
Carl |
|
Back to top |
|
|
PaulLaidler Site Admin
Joined: 21 Feb 2005 Posts: 7925 Location: Salford, UK
|
Posted: Wed Mar 14, 2007 1:29 pm Post subject: |
|
|
Carl
Thanks for the suggestion. I would need further details before I understood exactly what you are looking for; maybe even a sample using the existing FTN95 so that we can find out why it fails in the given environment. |
|
Back to top |
|
|
DrTip
Joined: 01 Aug 2006 Posts: 74 Location: Manchester
|
Posted: Thu Mar 15, 2007 11:01 am Post subject: |
|
|
Hil Paul
thanks for the reply
A simple example would be
--------------------------------------
integer function add (first, second)
integer first,second
add = first+second
end function
-----------------------------------
my steps were compile above function using clr version 2 to a dll
the step that failed was then in the sql server 2005 database
--
create assembly tesftn95 from 'c:\testftn95.dll'
this returns an error from the database saying the dll refers to ftn95lib.dll
I then attempted to load that dll on to the database but a similar message said the ftn95lib.dll refered to another dll like system.windows.forms I then gave up because I know forms are not allowed on the server.
this is a link to an example of how this stuff works using C#
http://msdn2.microsoft.com/ru-ru/library/ms131043.aspx
ultimately the aim is to have a function that can be used to add columns together or what ever using the the new function. obviously adding two columns is pretty piointless but running newton raphson iterations given a set of parameters might not be!
Carl |
|
Back to top |
|
|
|