Hi,
I am using SQL2005 and I have a table-valued function called fn_GetCompanies which returns a table of company names. The function works fine in SQL, but when I try and access the function from a client app using ADO I am getting the following error message:
OLE IDDispatch exception code 0 from Microsoft OLE DB Provider for SQL Server: "fn_GetCompanies" is not a recognised function name...
The code below is how I am calling the function from ADO:
* Execute function against SQL databases
oCmd.ActiveConnection = oConn
oCmd.CommandText = "SELECT * FROM ::fn_GetCompanies()"
oRecs = oCmd.Execute
I am using ADO 2.7. Thanks your help!
I am using SQL2005 and I have a table-valued function called fn_GetCompanies which returns a table of company names. The function works fine in SQL, but when I try and access the function from a client app using ADO I am getting the following error message:
OLE IDDispatch exception code 0 from Microsoft OLE DB Provider for SQL Server: "fn_GetCompanies" is not a recognised function name...
The code below is how I am calling the function from ADO:
* Execute function against SQL databases
oCmd.ActiveConnection = oConn
oCmd.CommandText = "SELECT * FROM ::fn_GetCompanies()"
oRecs = oCmd.Execute
I am using ADO 2.7. Thanks your help!