markrendle / Simple.Data

A light-weight, dynamic data access component for C# 4.0
MIT License
1.33k stars 302 forks source link

Sqlite Insert returns Null Sqlite #332

Open ghost opened 10 years ago

ghost commented 10 years ago

Using version from NuGet Stable (and Pre), Core and Sqlite on Windows, .net 4/4.5

When I do an insert I get Null value back. The data is present in the database afterwards. I used Insert via Object and Parameters, return value goes into a Var. Both dont work?

In Sqlite the Scan table has a ID column Integer Primary Key. (so alias for rowId, and autoincrement).

var db = Database.OpenFile("Database.db"); var x = db.Scan.Insert(Name:"Test", Description:"test", CreationDate:DateTime.Now, DocumentDate:DateTime.Now, ModifiedDate:DateTime.Now);

Does this even work at all for Sqlite?

markrendle commented 10 years ago

I don't know if the SQLite provider supports fetching back the inserted row. I'll check.

ghost commented 10 years ago

Did you find anything? Tia.