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. string of GUID as Select Parameter in objectdatasource

string of GUID as Select Parameter in objectdatasource

Scheduled Pinned Locked Moved Database
databasequestion
3 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.
  • D Offline
    D Offline
    DotNetDominator
    wrote on last edited by
    #1

    Hi, I have one ObjectDataSource which has a Select query that requires Parameter @CompanyId. CompanyId is Guid and I want to compare it with a bunch of GUID. Can i pass those Guid programatically??? my Query is like.. select a.companyId, b.startdate, b..... from a,b where a.companyId IN (@CompanyID)

    G 1 Reply Last reply
    0
    • D DotNetDominator

      Hi, I have one ObjectDataSource which has a Select query that requires Parameter @CompanyId. CompanyId is Guid and I want to compare it with a bunch of GUID. Can i pass those Guid programatically??? my Query is like.. select a.companyId, b.startdate, b..... from a,b where a.companyId IN (@CompanyID)

      G Offline
      G Offline
      goyal manish
      wrote on last edited by
      #2

      hi there yes you can use this query but remember to pass @CompanyID as a comma separated string of ids.

      D 1 Reply Last reply
      0
      • G goyal manish

        hi there yes you can use this query but remember to pass @CompanyID as a comma separated string of ids.

        D Offline
        D Offline
        DotNetDominator
        wrote on last edited by
        #3

        Hi, Thanks for the answer. I found one alternate way to do it as someone suggested me from Asp.net forum. But, Your reply made me think about the simple mistake i was making. I had provided Comma between values but I did not provide quotes between value. Hence, each guid was compared to entire string i suppose. I'll try to put 'guid','guid' format as well. Thanks

        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