Unix Technical Forum

use function from asp file in stored procedure

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 ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > SQL Server

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-29-2008, 05:16 AM
Michael Freiermuth
 
Posts: n/a
Default use function from asp file in stored procedure

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-29-2008, 05:16 AM
Erland Sommarskog
 
Posts: n/a
Default Re: use function from asp file in stored procedure

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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-29-2008, 05:16 AM
Robin Tucker
 
Posts: n/a
Default Re: use function from asp file in stored procedure

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



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-29-2008, 05:17 AM
Mike Epprecht \(SQL MVP\)
 
Posts: n/a
Default Re: use function from asp file in stored procedure

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

>
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 09:14 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com