string of GUID as Select Parameter in objectdatasource
-
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)
-
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)
hi there yes you can use this query but remember to pass @CompanyID as a comma separated string of ids.
-
hi there yes you can use this query but remember to pass @CompanyID as a comma separated string of ids.
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