1) This is what I have set on the top of the asp page
<%@ Language=VBScript transaction=required %>
On Error Resume Next
2) next I process the info. Like first get the information form previous
page like
Firstname = request.form("firstname")
Lastname = request.form("lastname")
And so on.. And once I have all that information (which also has the
customer credit card inforomation then it is taken to transaction processing
company for charging and once that is done I get a reply as 1,2 or 3
1 as in success, 2 as in decline(lack of funds) and 3 as in decline(due to
some other error).
If the reply is 1 then I redirect the user to final page where in insert the
information in database.
In rest of replies I just display the Error message to user.
3) After all this at the last on this page I have set the error handling
part which is as follows
if Err.number <> 0 then
ObjectContext.SetAbort
errorDesc = Err.Description
errorNo = Err.number
call sendErrorInEmail(errorNo,errorDesc)
end if
sub sendErrorInEmail(ENo,EDesc)
ErrorMsg = "<font color=black size=1 face=verdana><b>" & ENo &
"</b> " & EDesc & "</font>"
set errorMail = server.CreateObject("CDONTS.Newmail")
errorMail.From = "Admin@domain.com"
errorMail.To = "support@domain.com"
errorMail.Subject = "Error while Registering user for company"
errorMail.BodyFormat = 0
errorMail.MailFormat = 0
errorMail.Body = ErrorMsg
errorMail.Send
set errorMail = nothing
Response.Clear
Response.Write "<font color=darkblue size=1 face=verdana>There was an error
while processing your request.</font><br><br>"
Response.Write "<input type=button name=btnBck value='Back'
onclick=javascript:history.back()'>"
Response.End
end sub
4) And following is what the error message I get
-2147217900 [Microsoft][ODBC SQL Server Driver][SQL Server]Distributed
transaction completed. Either enlist this session in a new transaction or
the NULL transaction.
Hope this will help
Thank you
[quoted text, click to view] "Niel" <winowa@hotmail.com> wrote in message
news:010701c3ce33$6251ae40$a301280a@phx.gbl...
> Hi,
> I am working on ASP 3.0 with MS SQL 2000. We have an
> online registration form where in once the information is
> submitted (along with credit card info.) the information
> is taken on another asp page where i have set the page
> level transaction (transaction = required) on.
> Once the information is verified on this page and if
> everything is fine then internally another page is called
> where the information is stored into the database.
> Now i have put the error handling part in the second page
> where information is verified in which i have made it that
> when an error comes then the transaction should be rolled
> back (ObjectContext.SetAbort) and then the error number
> (Err.Number) and the error description(Err.Description)
> is emailed at my address. I just put this error handling
> part few days back and now not always but at times i do
> get Email which has the error number and error description
> as follows
>
> --------------------------------------------------------
>
> -2147217900 [Microsoft][ODBC SQL Server Driver][SQL
> Server]Distributed transaction completed. Either enlist
> this session in a new transaction or the NULL transaction.
>
> --------------------------------------------------------
>
> I tried searching for this error but couldn't find the
> exact reason and solution for the same.
> So if any one has and idea about this and the exact
> solutino to it or some url where i can go and see the
> solution then please let me know.
>
> Thank you