Calling a MS SQL Server scalar UDF from vba

2019-05-22 20:03发布

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?

2条回答
SAY GOODBYE
2楼-- · 2019-05-22 20:14

Create a query that calls the function.

SELECT [FirstName], [Surname]
  FROM dbo.FindCustomersOrderByDesc();
查看更多
【Aperson】
3楼-- · 2019-05-22 20:30
Dim rst As ADODB.Recordset
Set rst = Connection.Execute("SELECT dbo.MyFunction('" & Me.field & "')")
查看更多
登录 后发表回答