Re: [sqlite] FirstOrDefault crashes using linq

2012-01-26 Thread Truls Haaland
--- Den ons 2012-01-25 skrev Joe Mistachkin : > The supported alternative here is the ObjectContext class > from the Entity Framework Thank you. I will check this out. I am not using the Entity Framework, so I will have to figure out how to create an ObjectContext manually. I guess I'm off Googli

Re: [sqlite] FirstOrDefault crashes using linq

2012-01-25 Thread Joe Mistachkin
It looks like the DataContext class is the culprit here as it is specific to SQL Server, see: http://stackoverflow.com/questions/3706954/is-the-datacontext-class-specific -to-sql-server The supported alternative here is the ObjectContext class from the Entity Framework, see: http://msdn.microso

Re: [sqlite] FirstOrDefault crashes using linq

2012-01-25 Thread Truls Haaland
> Would it be possible to see the generated SQL statement (from inside > the Prepare method) that is causing the exception? I have tried unsuccessfully to create the debug version of System.Data.SQLite , so that is why I put the project on github. If anyone has the time to check out the project

Re: [sqlite] FirstOrDefault crashes using linq

2012-01-25 Thread Joe Mistachkin
Truls Haaland wrote: > > I am using the latest official version (1.0.77.0) on Windows7 with .NET 4.0. > > The full error message (including stack trace) is: > Would it be possible to see the generated SQL statement (from inside the Prepare method) that is causing the exception? -- Joe Mistach

[sqlite] FirstOrDefault crashes using linq

2012-01-25 Thread Truls Haaland
I am trying out System.Data.SQLite.LINQ and I am getting crashes with FirstOrDefault(). I have created a table with the SQL: CREATE TABLE Person(   Id INTEGER PRIMARY KEY,   Name TEXT NOT NULL,   Age INTEGER NOT NULL ); The C# class I am reading into is defined as:   [TableAttribute(Name="Pers