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. General Programming
  3. Visual Basic
  4. Limit choices that can be provided to a method argument

Limit choices that can be provided to a method argument

Scheduled Pinned Locked Moved Visual Basic
questiondatabase
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.
  • M Offline
    M Offline
    Marcus J Smith
    wrote on last edited by
    #1

    I tried to Google this but I dont really know what I am trying to ask I guess. How can I emulate what the SqlCommandType property does with regard to the 3 choice list? You can only choose Text, Stored Procedure and TableDirect. I have the need to do the same thing.


    CleaKO

    "Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)

    S J 2 Replies Last reply
    0
    • M Marcus J Smith

      I tried to Google this but I dont really know what I am trying to ask I guess. How can I emulate what the SqlCommandType property does with regard to the 3 choice list? You can only choose Text, Stored Procedure and TableDirect. I have the need to do the same thing.


      CleaKO

      "Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)

      S Offline
      S Offline
      Steven St John
      wrote on last edited by
      #2

      Can you give some code? My first thought was you might use an Enum in some way, but it is hard to know without knowing what you want your method to do...

      1 Reply Last reply
      0
      • M Marcus J Smith

        I tried to Google this but I dont really know what I am trying to ask I guess. How can I emulate what the SqlCommandType property does with regard to the 3 choice list? You can only choose Text, Stored Procedure and TableDirect. I have the need to do the same thing.


        CleaKO

        "Now, a man would have opened both gates, driven through and not bothered to close either gate." - Marc Clifton (The Lounge)

        J Offline
        J Offline
        Jon_Boy
        wrote on last edited by
        #3

        I think this is what you are asking for. System.Data.CommandType will give you the enum list for text, sp, table, etc. IE: Public Sub ExecuteSQLScalar(ByVal vCommandType As CommandType = CommandType.Text, more parms here...) Found the online MSDN page if you need a little more detail: http://msdn.microsoft.com/en-us/library/system.data.commandtype(VS.80).aspx[]

        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