This is a discussion on use function from asp file in stored procedure within the SQL Server forums, part of the Microsoft SQL Server category; --> Hello everybody, I have a file with several asp functions where some depend on others. Some of the functions ...
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hello everybody, I have a file with several asp functions where some depend on others. Some of the functions I will need to transform a string value. How can I include these functions in a stored procedure? (in Sql Server 2000) Do I have to add all the functions as userdefined functions? Or is possible to reference the external file like include files in asp? Thank you for your help! Regards, Michael |
| |||
| Michael Freiermuth (freiermuth@netelite.ch) writes: > I have a file with several asp functions where some depend on others. > Some of the functions I will need to transform a string value. > > How can I include these functions in a stored procedure? (in Sql > Server 2000) > > Do I have to add all the functions as userdefined functions? > Or is possible to reference the external file like include files in > asp? I would probably be possible to do, if you put those function in a COM object and then invoke this COM object with sp_OAmethod and friends. But there are all sorts of issues with this path, including performance. You probably better off rewriting the functions in T-SQL, unless the string transformations are immensly complex. In the next version of SQL Server, SQL 2005, currently in beta, it's a different matter. There you can put code written in .Net languages inside SQL Server. (Not ASP classic, though.) -- Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se Books Online for SQL Server SP3 at http://www.microsoft.com/sql/techinf...2000/books.asp |
| |||
| Really? Is there an FAQ about this anywhere....? "Erland Sommarskog" <esquel@sommarskog.se> wrote in message news:Xns95C59E828217AYazorman@127.0.0.1... > Michael Freiermuth (freiermuth@netelite.ch) writes: >> I have a file with several asp functions where some depend on others. >> Some of the functions I will need to transform a string value. >> >> How can I include these functions in a stored procedure? (in Sql >> Server 2000) >> >> Do I have to add all the functions as userdefined functions? >> Or is possible to reference the external file like include files in >> asp? > > I would probably be possible to do, if you put those function in a COM > object and then invoke this COM object with sp_OAmethod and friends. > > But there are all sorts of issues with this path, including performance. > You probably better off rewriting the functions in T-SQL, unless the > string transformations are immensly complex. > > In the next version of SQL Server, SQL 2005, currently in beta, it's a > different matter. There you can put code written in .Net languages > inside SQL Server. (Not ASP classic, though.) > > > -- > Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se > > Books Online for SQL Server SP3 at > http://www.microsoft.com/sql/techinf...2000/books.asp |
| ||||
| http://www.microsoft.com/sql/2005/pr...30features.asp Under the developer heading. There is a lot more information on the site. http://msdn.microsoft.com/sql/defaul...lrguidance.asp Regards -------------------------------- Mike Epprecht, Microsoft SQL Server MVP Zurich, Switzerland IM: mike@epprecht.net MVP Program: http://www.microsoft.com/mvp Blog: http://www.msmvps.com/epprecht/ "Robin Tucker" <idontwanttobespammedanymore@reallyidont.com> wrote in message news:cq6t6a$2cr$1$8300dec7@news.demon.co.uk... > Really? Is there an FAQ about this anywhere....? > > "Erland Sommarskog" <esquel@sommarskog.se> wrote in message > news:Xns95C59E828217AYazorman@127.0.0.1... > > Michael Freiermuth (freiermuth@netelite.ch) writes: > >> I have a file with several asp functions where some depend on others. > >> Some of the functions I will need to transform a string value. > >> > >> How can I include these functions in a stored procedure? (in Sql > >> Server 2000) > >> > >> Do I have to add all the functions as userdefined functions? > >> Or is possible to reference the external file like include files in > >> asp? > > > > I would probably be possible to do, if you put those function in a COM > > object and then invoke this COM object with sp_OAmethod and friends. > > > > But there are all sorts of issues with this path, including performance. > > You probably better off rewriting the functions in T-SQL, unless the > > string transformations are immensly complex. > > > > In the next version of SQL Server, SQL 2005, currently in beta, it's a > > different matter. There you can put code written in .Net languages > > inside SQL Server. (Not ASP classic, though.) > > > > > > -- > > Erland Sommarskog, SQL Server MVP, esquel@sommarskog.se > > > > Books Online for SQL Server SP3 at > > http://www.microsoft.com/sql/techinf...2000/books.asp > > |