Transaction when using smo and DataContext of linq

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Guest's Avatar

    Transaction when using smo and DataContext of linq

    In the operation,it is neccessary to create a new table by smo and then
    insert some data into the new table by DataContext.Exe cutecommand().
    Is it possible to implement in a transaction? If no,any adivise?
    Thanks.


  • Marc Gravell

    #2
    Re: Transaction when using smo and DataContext of linq

    I haven't tried (I'm not a big fan of too much CREATE TABLE inside an
    app [except for @ or #]), but \you could try wrapping the whole thing
    in a TransactionScop e... alternatively, use raw SQL to create the
    table insead of SMO?

    Marc

    Comment

    • Paker Liu

      #3
      Re: Transaction when using smo and DataContext of linq

      Thanks for your reply.
      I will test the case with TransactionScop e and send a report about the
      results later.
      thank you again.
      Paker Liu
      "Marc Gravell" <marc.gravell@g mail.comwrote in message
      news:96e5b61e-0b08-4526-a0f1-b2cd60d98913@e6 0g2000hsh.googl egroups.com...
      >I haven't tried (I'm not a big fan of too much CREATE TABLE inside an
      app [except for @ or #]), but \you could try wrapping the whole thing
      in a TransactionScop e... alternatively, use raw SQL to create the
      table insead of SMO?
      >
      Marc

      Comment

      Working...