I have an ODBC connection object to a SQL Server in my vba code (which I believe is functioning OK). I want to execute a user defined function on the server using that connnection and store the result in a variable in my vba code. I'm not sure what the syntax is...
Code:
Dim wrkODBC As Workspace
Dim conOdbc As Connection
Dim functionResult As String
Set wrkODBC = CreateWorkspace "NewODBCWorkspace", "admin", "", dbUseODBC)
Set conOdbc = wrkODBC.OpenConnection("Cascade_PICS",
dbDriverNoPrompt, True, "ODBC;DATABASE=Thrombo_PiCS;DSN=Cascade_PICS")
'?????? here is something like I would expect I'm trying to do
functionResult = conOdbc.Execute("myfunction(25)")