Board index » delphi » User Defined Functions in SQL 7.0?

User Defined Functions in SQL 7.0?

Hi,
  I have just started looking at MS SQL Server 7.0. It seems there is n
standard "User Defined Function" capability. But there is such a thing
called "Open Data Services" that you can use to write "Extended Stored
Procedures". Is this the same as "User Defined Functions"? Also to write one
of these "fucntions" you need to link to a "LIB" file. So I assume that
there is no simple way to do this from a Delphi program other than writing a
C DLL that exposes this functionality in a more Delphi friendly way. It is
correct?

Any suggestions?
--
Mujahid Beg
Chief Technology Officer
FH&R Inc.

"Who is General Failure, and why is he reading my hard drive?"

 

Re:User Defined Functions in SQL 7.0?


Quote
Alam Beg wrote in message <7ikf24$5...@forums.borland.com>...
>  I have just started looking at MS SQL Server 7.0. It seems there is n
>standard "User Defined Function" capability. But there is such a thing
>called "Open Data Services" that you can use to write "Extended Stored
>Procedures". Is this the same as "User Defined Functions"?

No.  This is the same as stored procedures only written in a compiled
language and packaged in a DLL.  Stored procedures are no substitute
for true 'User Defined Functions' but have their own uses.

Hope this helps,
William
--
William Tucker
Compu-Share, Inc.

WTuc...@Compu-Share.com
William.Tuc...@worldnet.att.net

Re:User Defined Functions in SQL 7.0?


You are right. UDF's and Stored Procedures are not the same. But in this
case, for what I am trying to do, a stored procedure will work just as well.

So that brings me back to the other part of the question. Any easy way of
ding this using Delphi, othe rthat usiing a C compiler to create a DLL that
exports this stuff?

-- Mujahid Beg

Quote
William Tucker wrote in message <7im7q4$6c...@forums.borland.com>...

>No.  This is the same as stored procedures only written in a compiled
>language and packaged in a DLL.  Stored procedures are no substitute
>for true 'User Defined Functions' but have their own uses.

>Hope this helps,
>William
>--
>William Tucker
>Compu-Share, Inc.

>WTuc...@Compu-Share.com
>William.Tuc...@worldnet.att.net

Re:User Defined Functions in SQL 7.0?


if for other cases when it wont do fine
you can call COM objects from SQL server stored procedures
so just make an interface for your UDF's change a little code
register a com object and walla
Quote
Alam Beg wrote:
> You are right. UDF's and Stored Procedures are not the same. But in this
> case, for what I am trying to do, a stored procedure will work just as well.

> So that brings me back to the other part of the question. Any easy way of
> ding this using Delphi, othe rthat usiing a C compiler to create a DLL that
> exports this stuff?

> -- Mujahid Beg

> William Tucker wrote in message <7im7q4$6c...@forums.borland.com>...

> >No.  This is the same as stored procedures only written in a compiled
> >language and packaged in a DLL.  Stored procedures are no substitute
> >for true 'User Defined Functions' but have their own uses.

> >Hope this helps,
> >William
> >--
> >William Tucker
> >Compu-Share, Inc.

> >WTuc...@Compu-Share.com
> >William.Tuc...@worldnet.att.net

Other Threads