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. datatype mapping

datatype mapping

Scheduled Pinned Locked Moved Database
csharpmysql
5 Posts 2 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
    Gilbert Consellado
    wrote on last edited by
    #1

    Good day to all, Why tinyint(3) of mysql is treated as sbyte in .net(c#). I cant find any official datatype mapping for .net and mysql out there.

    L 1 Reply Last reply
    0
    • G Gilbert Consellado

      Good day to all, Why tinyint(3) of mysql is treated as sbyte in .net(c#). I cant find any official datatype mapping for .net and mysql out there.

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      See http://msdn.microsoft.com/en-gb/library/ms187745.aspx[^].

      G 1 Reply Last reply
      0
      • L Lost User

        See http://msdn.microsoft.com/en-gb/library/ms187745.aspx[^].

        G Offline
        G Offline
        Gilbert Consellado
        wrote on last edited by
        #3

        sorry but still dont get it. example: var t = typeof(reader[0]); the "t" is a type of sbyte, i was expecting it to be int or short. could be the value matter also? BTW i dont use (example: reader[0].toInt()) for a purpose.

        L 1 Reply Last reply
        0
        • G Gilbert Consellado

          sorry but still dont get it. example: var t = typeof(reader[0]); the "t" is a type of sbyte, i was expecting it to be int or short. could be the value matter also? BTW i dont use (example: reader[0].toInt()) for a purpose.

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          The link I gave you shows the mapping: tinyint maps to a single byte which, in computer memory, is a signed byte. This allows you to promote it to an integer without the necessity of any data conversion. Explained in slightly more detail at http://dev.mysql.com/doc/refman/5.1/en/integer-types.html[^].

          G 1 Reply Last reply
          0
          • L Lost User

            The link I gave you shows the mapping: tinyint maps to a single byte which, in computer memory, is a signed byte. This allows you to promote it to an integer without the necessity of any data conversion. Explained in slightly more detail at http://dev.mysql.com/doc/refman/5.1/en/integer-types.html[^].

            G Offline
            G Offline
            Gilbert Consellado
            wrote on last edited by
            #5

            ohh thank you so much, now i understand it.

            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