www.webdeveloper.com
Results 1 to 2 of 2

Thread: SqlDataSource UpdateCommand plus Insert

  1. #1
    Join Date
    Jul 2005
    Posts
    43

    SqlDataSource UpdateCommand plus Insert

    SqlDataSource UpdateCommand plus Insert

    I have a SqlDataSource with an UpdateCommand but besides that i need also an Insert command triggered on the same update command.

    Thatīs because i need to update a record and at the same time include a log of that update in another database.

    Thanks

  2. #2
    Join Date
    Dec 2006
    Location
    Brazil
    Posts
    80
    What you need is to create a transaction. A transaction is a list of db commands that will only true happen when the transaction is commited. Example, your Update command will happen but the results will be cached, it will not be stored your db until the transaction is commited. So you will only commit this transaction after your insert. I cant provide codes because of the framework we use here but try looking for ".Net Transactions" on google.

    Hope this helps
    lotuzwine

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles