table-value function from ADO
-
Hey everybody! I created a table-value function, so I will be able to perform a SELECT with parameters: SELECT * FROM get_user (1) -- returns user with userID "1" The problem is that I can't find a way to call this function from C++ using ADO (not ADO.Net). :confused: I've been searching the net for 2 days now, and I'm pretty close to give up... :sigh: Thanks in advance!!! :)
-
Hey everybody! I created a table-value function, so I will be able to perform a SELECT with parameters: SELECT * FROM get_user (1) -- returns user with userID "1" The problem is that I can't find a way to call this function from C++ using ADO (not ADO.Net). :confused: I've been searching the net for 2 days now, and I'm pretty close to give up... :sigh: Thanks in advance!!! :)
Have you tried actually running "
SELECT * FROM get_user(1)
" from an ADO command? It should work fine - although most people tend to use stored procedures for this type of thing.modified on Friday, April 25, 2008 6:02 AM
-
Hey everybody! I created a table-value function, so I will be able to perform a SELECT with parameters: SELECT * FROM get_user (1) -- returns user with userID "1" The problem is that I can't find a way to call this function from C++ using ADO (not ADO.Net). :confused: I've been searching the net for 2 days now, and I'm pretty close to give up... :sigh: Thanks in advance!!! :)
Are you getting an error of some sort? I can't say I can help with the C++ part, but your query probably won't even work in QueryAnalyzer from the looks of it. UDFs and TVFs must be schema-qualified, like this: SELECT * FROM dbo.get_user(1) So what you're missing is "dbo." I hope that helps.
Mark's blog: developMENTALmadness.blogspot.com Funniest variable name: lLongDong - spotted in legacy code, was used to determine how long a beep should be. - Dave Bacher