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. DataSet with GUIDs

DataSet with GUIDs

Scheduled Pinned Locked Moved Database
databasequestionsql-serversysadminxml
2 Posts 1 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
    mikasa
    wrote on last edited by
    #1

    I have a DataTable with a PKey defined as a GUID. The problem is trying to "lookup" values in the DataTable.Select Method. Since this is a GUID column, I cannot do the normal things like I could in SQL Server (i.e. DataTable.Select("ID = '" & sID & "'")). In SQL, the GUID DataType is treated like a String. I generated an XSD Schema of my table, and I got this info for the PKey:

    xs:element name="ID" msdata:DataType="System.Guid, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" type="xs:string"

    How can I get my DataTable to treat my PKey like a String at run time without loading aa Schema first? Or, how can I lookup GUID values in a DataTable??? :omg::wtf:

    M 1 Reply Last reply
    0
    • M mikasa

      I have a DataTable with a PKey defined as a GUID. The problem is trying to "lookup" values in the DataTable.Select Method. Since this is a GUID column, I cannot do the normal things like I could in SQL Server (i.e. DataTable.Select("ID = '" & sID & "'")). In SQL, the GUID DataType is treated like a String. I generated an XSD Schema of my table, and I got this info for the PKey:

      xs:element name="ID" msdata:DataType="System.Guid, mscorlib, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" type="xs:string"

      How can I get my DataTable to treat my PKey like a String at run time without loading aa Schema first? Or, how can I lookup GUID values in a DataTable??? :omg::wtf:

      M Offline
      M Offline
      mikasa
      wrote on last edited by
      #2

      Ok, for some unknown reason, this now works when I know before it didn't :wtf:

      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