Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to use a UDF in SQL ?
Message
General information
Forum:
Visual Basic
Category:
Database DAO/RDO/ODBC/ADO
Miscellaneous
Thread ID:
00747648
Message ID:
00747927
Views:
20
>Eric,
>Sorry but I really didn't understand your response.
>But, an experienced VB/SQL person just informed me that you CANNOT use a user-defined function in a SQL statement ... when Executed via ADO and the underlying drivers. Having used UDFs before in VFP & Access, this comes as a surprise.
>Steve H

Yes, but it is the case. You can call stored procedures, but UDFs are a newer animal in the SQL Server world and are not directly supported by OLEDB. You can, however call the UDF as part of a select statement to acheive the result:

rs.open "SELECT dbo.MyUDF('param1', 'param2') AS Result"

... or something along those lines....
The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts. - Bertrand Russell
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform