Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. table-value function from ADO

table-value function from ADO

Scheduled Pinned Locked Moved Database
csharpc++algorithmshelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Green Fuze
    wrote on last edited by
    #1

    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!!! :)

    A M 2 Replies Last reply
    0
    • G Green Fuze

      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!!! :)

      A Offline
      A Offline
      andyharman
      wrote on last edited by
      #2

      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

      1 Reply Last reply
      0
      • G Green Fuze

        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!!! :)

        M Offline
        M Offline
        Mark J Miller
        wrote on last edited by
        #3

        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

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups