Rollback Transaction

Results 1 to 2 of 2

Thread: Rollback Transaction

  1. #1
    Saharul Guest

    Default Rollback Transaction

    Hello,<BR><BR>I would like to know whether it is possible to rollback an erroneous database transaction like in Visual Basic.<BR>For example in VB you can have code as shown below :-<BR><BR>Dim Cn As New ADODB.Connection<BR>Dim rs As New ADODB.Recordset<BR><BR>&#039 Open connection.<BR>Cn.Open "pubs", "sa"<BR>&#039use SQLOLEDB<BR>&#039Cn.Open "Provider=SQLOLEDB;Data Source=sqlserver7;User ID=sa;Password=;Initial ‘Catalog=pubs"<BR><BR>&#039 Open titles table.<BR>rs.Open "Select * From titles", Cn, adOpenDynamic, adLockPessimistic<BR>Cn.BeginTrans<BR>&#039 &#060;&#060;make changes&#062;&#062;<BR>Cn.CommitTrans<BR>&#039 or rollback<BR>&#039 cn.RollbackTrans<BR>Cn.Close<BR><BR>I would like to know whether in ASP you can write <BR>something like this: cn.BeginTrans <BR><BR>Thanks for any input<BR><BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Rollback Transaction

    I&#039ve never tried this is ASP, I don&#039t think you can. I do all transactions in Stored Procedures. And you can there. Good Luck.

Posting Permissions

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