I have a C # application (using VS 2010 premium class) that implements a strongly typed dataset connected to an MS Access 2003 database. I am implementing a table adapter in this dataset, SQL script:
SELECT [ID], [Name], [Created By] FROM [Table Group] WHERE [Created By] = ? AND [ID] IN (SELECT [Group ID] FROM [Table Clustering] WHERE [Cluster ID] = ?) ORDER BY [Name]
Problem
is that it does not return anything, but presumably it should (I have sample data in my database). I have already tried to implement the same script in MS Access (replacing? S with real data), and it returns the expected data.
I experimented by removing "WHERE [Cluster ID] = ?" into the built-in SELECT statement and returned the data, but this is not what I need.
I also did another experiment by replacing? inside the built-in SELECT statement with the actual [Cluster ID], and it returned the data, but again, thatβs not what I need.
So what is the problem with the SQL script inside the table adapter? Is she able to implement SELECT in SELECT? moreover, is it capable of realizing? in SELECT in SELECT? as?
Thank you! =)


as expected, the IDE automatically generates a method (to retrieve data) for the table adapter that I made, ergo I do not need to manually create an SQL script in the code ... for each information (in case you are "not familiar") generated the method asks for two parameters (as expected), one for [Created] and one for [Cluster ID] ... from here, please refer to my problem published above .: D
source share