I?m using SQLite with .NET and LINQ. When I call Skip on an IQueryable, the 
generated SQL uses ?TOP? instead of ?Limit? which is causing an error due to 
SQLite not supporting the Top keyword. I have referenced both 
System.Data.SQLite, System.Data.SQLite.Linq, and System.Data.Linq in the Visual 
Studio Project. Below is some sample code:


var cachedFilePath = String.Concat(PathInfo.getDataPath() + "reports\\", 
reportGUID, ".", "sqlite");
var dbConnection = new SQLiteConnection("Data Source=somePath; ");
dbConnection.Open();

var context = new DataContext(dbConnection);
var table = context.GetTable<ClassName>();

var queryable = table.Skip(20);                  // Incorrect SQL generated


Does anyone have any ideas how to get LINQ to generate the correct ?Limit? 
clause?
Confidentiality Notice: This e-mail message, including any attachments, is for 
the sole use of NAVEX Global? Inc. and the intended recipients and may contain 
confidential and privileged information. Any unauthorized review, use, 
disclosure, or distribution is prohibited. If you are not the intended 
recipient, please contact the sender by reply e-mail and destroy all copies of 
the original message.

Reply via email to