Skip to content

Installed EntityFrameworkCore.Jet Get,Put,Delete Work but Cant Insert #65

@jssg33

Description

@jssg33

I installed your drivers with MSAccess default Student Database, and Used Entity Framework to Scaffold the Database. The Student Database has an attachment field, and an autoincrement ID field by default. Get, Delete, and Update Work...but adding a new record fails.

When I try to do an insert without an attach statement, I get an error of cannot insert into a multi-valued field. When I add the attach to the inserted data, it appears to work without an error but it doesnt save the data..... Example......

context.Students.Add(input);
await context.SaveChangesAsync();

Microsoft.EntityFrameworkCore.DbUpdateException: An error occurred while saving the entity changes. See the inner exception for details.
---> System.Data.OleDb.OleDbException (0x80004005): An INSERT INTO query cannot contain a multi-valued field.

context.Students.Add(input);
context.Attach(input);
await context.SaveChangesAsync();

Doesnt give an error but nothing is saved in the DB?

Help? This is a DB First Example.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions