cdikmen
New member
- Joined
- May 5, 2009
- Messages
- 1
- Programming Experience
- 10+
I am new to LINQ so please forgive my ignorance. Here is a SQL query that I need to replicate in LINQ:
Dim MyString as String = "101,304,444,986"
Dim vSQL as "SELECT FROM COMPANY WHERE comp_status = 'A' AND comp_id IN (" + MyString + ") ORDER BY comp_name"
I have tried the following direct SQL in LINQ but get weird results:
db.ExecuteQuery(Of crCompany)(vSQL.ToString)
I am not even sure how to "get to" the results from this statement (I need to loop through the result set), but it appears to return 468 rows when it should only return 4.
Any help would be greatly appreciated.
Dim MyString as String = "101,304,444,986"
Dim vSQL as "SELECT FROM COMPANY WHERE comp_status = 'A' AND comp_id IN (" + MyString + ") ORDER BY comp_name"
I have tried the following direct SQL in LINQ but get weird results:
db.ExecuteQuery(Of crCompany)(vSQL.ToString)
I am not even sure how to "get to" the results from this statement (I need to loop through the result set), but it appears to return 468 rows when it should only return 4.
Any help would be greatly appreciated.