New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not use Transaction with MS Access DB #454
Comments
Also the data, i want to write inside the transaction, is written directly to the database. |
Create a simple code example and confirm if it works or not. If it works, look at how it could be going wrong with your codebase. In the case you can replicate a bug, post the code here ;)
…Sent from my iPhone
On 4 May 2018, at 9:24 pm, hpposch ***@***.***> wrote:
Also the data, i want to write inside the transaction, is written directly to the database.
It does not matter if i call AbortTransaction.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
The following basic use of a transaction with Access works for me. If you have a small reproducible example of a transaction not working, please post it. Please include the table structure if that seems to be part of the issue. var config = DatabaseConfiguration.Build()
.UsingConnectionString(@"...")
.UsingProvider<MsAccessDbDatabaseProvider>();
using (var db = new Database(config))
using (var trans = db.GetTransaction())
{
var poco = new Table1() { Field1 = "Thing2" };
db.Insert(poco);
trans.Complete();
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I have a MS Access database and i use PetaPoco with the OleDb to read and write data to that database.
Read-Write works perfectly, but when i try to use a transaction to write nested data (Header entry with multiple child entries) i get the following error:
The OleDB transaction has been completed, it is not longer usable
This happens always when i call Complete or CompleteTransaction.
I tried all differnet examples from here: https://github.com/CollaboratingPlatypus/PetaPoco/wiki/Transactions
I hope someone has got an idea how to solve this issue.
Thanks in advance :)
The text was updated successfully, but these errors were encountered: