ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel VBA and SQL Server 2000 UDF (https://www.excelbanter.com/excel-programming/310667-excel-vba-sql-server-2000-udf.html)

Charles

Excel VBA and SQL Server 2000 UDF
 
Hi All,

Can I get SQL Server 2000 UDF (user defined function) returned value
by using Excel VBA?

If I can, please provide a simple example.

I am using Excel 2000

Many thanks.

Jamie Collins

Excel VBA and SQL Server 2000 UDF
 
(Charles) wrote ...

Can I get SQL Server 2000 UDF (user defined function) returned value
by using Excel VBA?


Wrap the function in a stored procedure, call the stored proc from VBA
code using ADO.

Jamie.

--

Charles

Excel VBA and SQL Server 2000 UDF
 
Hi Jamie,

Thanks for reply.

I know how to work with Stored Procedures in SQL Server (by using
OUTPUT parameters)to get returned value (scale value), what I am
interested is, how or if is possible to get returned value from a SQL
Server UDF by using Excel VBA, just we get returned value from Excel
VBA UDF?

Yesterday I read some interesting stuff, suggest we CAN NOT get
returned value from SQL Server UDF, I wonder is this true? I would be
surprised to know we have to treat SQL Server UDF just like SQL Server
Stored Procedures - if this is the case, why we need UDF?

Thanks.

Kind Regards,

Charles
(Jamie Collins) wrote in message . com...
(Charles) wrote ...

Can I get SQL Server 2000 UDF (user defined function) returned value
by using Excel VBA?


Wrap the function in a stored procedure, call the stored proc from VBA
code using ADO.

Jamie.

--



All times are GMT +1. The time now is 01:58 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com