SelectBy...(count) Issue?

Oct 18, 2011 at 2:10 PM

Hi, I was just looking at the code for the generated select by methods which also specifiy a count parameter....

The generated code seems to contain 2 commandtext statements on one line, so the 2nd seems to overrule the first and does not apply the top keyword.


command.CommandText = "SELECT TOP(" + count + ") * FROM MyTable WHERE MyTableId=@MyTableId"; command.CommandText = "SELECT * FROM MyTable WHERE MyTableId=@MyTableId";


Oct 18, 2011 at 3:35 PM

Nice catch! I'll fix it tonight and publish a new build as soon as possible :)

Oct 18, 2011 at 3:46 PM

Also, the TOP keyword is not supported by SQL CE case that is a version you wanted to support.

Oct 18, 2011 at 8:59 PM

Currently only SQLCE 3.5 and 4.0 are supported

Oct 31, 2011 at 9:05 AM
This discussion has been copied to a work item. Click here to go to the work item and continue the discussion.