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

use function from asp file in stored procedure

P: n/a
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
Jul 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
Michael Freiermuth (fr********@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, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 23 '05 #2

P: n/a
Really? Is there an FAQ about this anywhere....?

"Erland Sommarskog" <es****@sommarskog.se> wrote in message
news:Xn**********************@127.0.0.1...
Michael Freiermuth (fr********@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, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp

Jul 23 '05 #3

P: n/a
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: mi**@epprecht.net

MVP Program: http://www.microsoft.com/mvp

Blog: http://www.msmvps.com/epprecht/

"Robin Tucker" <id*************************@reallyidont.com> wrote in
message news:cq*******************@news.demon.co.uk...
Really? Is there an FAQ about this anywhere....?

"Erland Sommarskog" <es****@sommarskog.se> wrote in message
news:Xn**********************@127.0.0.1...
Michael Freiermuth (fr********@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, es****@sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp


Jul 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.