Calling a MS SQL Server scalar UDF from vba
I am programming an Access 2007 (accdb, not adp) frontend at connect to a SQL Server 2005 backend. How can I call a scalar user 开发者_如何转开发defined function from my vba code?
Dim rst As ADODB.Recordset
Set rst = Connection.Execute("SELECT dbo.MyFunction('" & Me.field & "')")
Create a query that calls the function.
SELECT [FirstName], [Surname]
FROM dbo.FindCustomersOrderByDesc();
精彩评论