The EntitySpaces Community

Share and learn about the EntitySpaces Architecture.
Welcome to The EntitySpaces Community Sign in | Join | Help
in
Home Forums Photos

Is there any way to disable transactions?

Last post 08-22-2007, 9:56 AM by Mike.Griffin. 5 replies.
Sort Posts: Previous Next
  •  08-22-2007, 7:19 AM 4666

    Is there any way to disable transactions?

    Hey Mike,

    I need to know if there is any way to disable transactions.  The problem is this: I am running a script which does an update to several rows in a table based on iterating through a collection.  The problem, is that if one row fails, none of them get updated.

    While I understand the need and purpose of transactions, this is not the desired result in this case.  These records are for the most part, unrelated.  Basically, we are copying a bunch of records from one database to another, so if there is an FK error or something, then I would like for only the 'bad' record to fail, not the entire collection.

    I also would rather not load these one at a time - since that would take FOREVER!
    Any suggestions?

  •  08-22-2007, 7:49 AM 4667 in reply to 4666

    Re: Is there any way to disable transactions?

    I think you only need to call save in an entity not in collection.

     

  •  08-22-2007, 8:05 AM 4668 in reply to 4667

    Re: Is there any way to disable transactions?

    That only works if the entity is not already part of the collection.  Again - I would like to be able to work with the collection.
  •  08-22-2007, 8:09 AM 4669 in reply to 4667

    Re: Is there any way to disable transactions?

    Dang, currenly, on a collection there is not. However, this is the 2nd time this has come up. We just put out a beta last night, PostgreSQL is 100% functional. We're going to sneak in some fixes / features before we call it an official release. Is this something you have a few weeks to wait on? Did you purchase the source? I could probaby show you a quick fix if you did. We are going to need to add this ability to EntitySpaces so we'll take a look at it over the next few days.
    EntitySpaces | Twitter | BLOG | Please honor our Software License
  •  08-22-2007, 8:13 AM 4671 in reply to 4669

    Re: Is there any way to disable transactions?

    Yes, it would be great to have that asap. Can you show me the quick fix in the meantime.
  •  08-22-2007, 9:56 AM 4675 in reply to 4671

    Re: Is there any way to disable transactions?

    Well, on the DataAdapter there is a ContinueUpdateOnError boolean, it's new to .NET 2.0. You could set that to true. However, what we will probably do is add an additional overload on the Save() method that allows you to suppress the transaction. On this BLOG post you can see that there is a transaction type of esTransactionScopeOption.Suppress so will probably allow you to pass in a bool during save and use that for our Transaction type.
    EntitySpaces | Twitter | BLOG | Please honor our Software License
View as RSS news feed in XML