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. C#
  4. MySqlParameter... Add or AddWithValue?

MySqlParameter... Add or AddWithValue?

Scheduled Pinned Locked Moved C#
comquestionannouncement
4 Posts 4 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.
  • J Offline
    J Offline
    Jassim Rahma
    wrote on last edited by
    #1

    Hi, I want to ask about MySqlParameter, when to use Add and when to use AddWithValue? because both seems to be working in every case I tried..

    Technology News @ www.JassimRahma.com

    M P G 3 Replies Last reply
    0
    • J Jassim Rahma

      Hi, I want to ask about MySqlParameter, when to use Add and when to use AddWithValue? because both seems to be working in every case I tried..

      Technology News @ www.JassimRahma.com

      M Offline
      M Offline
      Mycroft Holmes
      wrote on last edited by
      #2

      There is no difference in the end result, AddWithValue just shortens the parameter creation process. Use the one you are comfortable with.

      Never underestimate the power of human stupidity RAH

      1 Reply Last reply
      0
      • J Jassim Rahma

        Hi, I want to ask about MySqlParameter, when to use Add and when to use AddWithValue? because both seems to be working in every case I tried..

        Technology News @ www.JassimRahma.com

        P Offline
        P Offline
        PIEBALDconsult
        wrote on last edited by
        #3

        You can use whichever you want, but I always use Add because IDataParameterCollection doesn't include AddWithValue.

        1 Reply Last reply
        0
        • J Jassim Rahma

          Hi, I want to ask about MySqlParameter, when to use Add and when to use AddWithValue? because both seems to be working in every case I tried..

          Technology News @ www.JassimRahma.com

          G Offline
          G Offline
          GREG_DORIANcod
          wrote on last edited by
          #4

          use AddWithValue! beacuse use a strongly type dataset functionality

          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