Ask a Question related to ASP Database, Design and Development.
-
Niel #1
Transaction Error
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
Niel Guest
-
#40687 [NEW]: ODBC+PHP+MSSQL generate error while executing multi query in one transaction
From: scottsdev at gmail dot com Operating system: Linux PHP version: 5.2.1 PHP Bug Type: ODBC related Bug description: ... -
Error: Cannot create new connection because in manual or distributed transaction mode
Luke, The first & second SP's both return a Scope_Identity() value for the record that the SP Inserts. However, I ignore the first one, but... -
@transaction=required - results in hang after error thrown
I have an asp page that uses the @TRANSACTION=REQUIRED directive. Within the page I create two of my vb com+ components that are marked require... -
Distributed Transaction Error
Hi there We have a asp page in which we are making some update calls connecting to SQL Server 2000. it's been done by... -
Error in Database Transaction
Has any one see the following error message. System.Runtime.InteropServices.COMException (0x8004D025): The partner transaction manager has... -
Mark Schupp #2
Re: Transaction Error
You might be able to get a better response if you posted your code.
If possible, strip it down to the bare minimum of code that still exhibits
your problem.
--
Mark Schupp
Head of Development
Integrity eLearning
[url]www.ielearning.com[/url]
"Niel" <nandip2k4@vippowernet.com> wrote in message
news:uVi$gBvzDHA.3196@TK2MSFTNGP11.phx.gbl...If> I haven't got any solution or answers from anyone. This is really urgent.> anyone has an idea on this please let me know.
> Any help would be appreciated.
>
> Thank you
>
>
> "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
>
Mark Schupp Guest
-
Niel #3
Re: Transaction Error
I haven't got any solution or answers from anyone. This is really urgent. If
anyone has an idea on this please let me know.
Any help would be appreciated.
Thank you
"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
Niel Guest
-
Niel #4
Re: Transaction Error
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
"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
Niel Guest
-
Bob Barrows #5
Re: Transaction Error
Niel wrote:
Sorry, I've never done transaction processing in my vbscript code: I've> Hi,
> does any knows the solution for the problem that i have described.
> Please let me know if any one has any idea about what should be done
> to avoid this.
always encapsulated my transactions in stored procedures. In fact, that is
my suggestion: put the entire process into a stored procedure, including the
email part (you can use the builtin SQLMail, or, if you prefer to use smtp
rather than mapi, install Gert Draper's XP_SMTP_SendMail (from
[url]http://www.sqldev.net/xp/xpsmtp.htm[/url]). see
[url]http://www.aspfaq.com/show.asp?id=2403[/url])
HTH,
Bob Barrows
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Bob Barrows Guest
-
Chris Hohmann #6
Re: Transaction Error
"Bob Barrows" <reb01501@NOyahoo.SPAMcom> wrote in message
news:%23XWC$XV0DHA.2116@TK2MSFTNGP11.phx.gbl...I've> Niel wrote:>> > Hi,
> > does any knows the solution for the problem that i have described.
> > Please let me know if any one has any idea about what should be done
> > to avoid this.
> Sorry, I've never done transaction processing in my vbscript code:that is> always encapsulated my transactions in stored procedures. In fact,including the> my suggestion: put the entire process into a stored procedure,smtp> email part (you can use the builtin SQLMail, or, if you prefer to useTo expand Bob's recommendation, I'd like to add that it is not advisable> rather than mapi, install Gert Draper's XP_SMTP_SendMail (from
> [url]http://www.sqldev.net/xp/xpsmtp.htm[/url]). see
> [url]http://www.aspfaq.com/show.asp?id=2403[/url])
to mix SQL Server transaction management with DTS/COM+ transaction
management. If the scope of your transactional logic is limited to SQL
Server then that's were the transaction management should occur. If the
scope goes beyond SQL Server, then use DTS/COM+ and make sure there are
no transaction calls in your stored procedure (this includes any sql
statements that would invoke triggers with transactional logic). You can
use RAISE ERROR/RETURN in your stored procedure to communicate status
back to DTS/COM+. In the rare case where your stored procedure needs to
be run in both a DTS/COM+ context and stand alone, you can use
@@TRANCOUNT to determine context and control the flow of your stored
procedure accordingly. However, I would strongly urge you to against
this approach except as a last resort. A stored procedure should either
be a discreet transaction onto itself or a "component" of a large
transaction, not both.
I realize there's a lot of "hand waving" in the above, but it's as
detailed as I could be absent the following:
1. The actual code for the stored procedure
2. OS Version
3. DTS Version
4. MDAC Version
Finally, here's a KB article on the error you are encountering which
discusses other possible causes.
[url]http://support.microsoft.com/default.aspx?scid=kb;en-us;191168[/url]
HTH
-Chris Hohmann
Chris Hohmann Guest
-
Chris Hohmann #7
Re: Transaction Error
"Chris Hohmann" <nospam@thankyou.com> wrote in message
news:Oq4Ol1W0DHA.2528@TK2MSFTNGP09.phx.gbl...or a "component" of a large transaction, not both.> A stored procedure should either be a discreet transaction onto itself
That should read "... of a LARGER transaction..."
Chris Hohmann Guest
-
Niel #8
Re: Transaction Error
Hi,
does any knows the solution for the problem that i have described.
Please let me know if any one has any idea about what should be done to
avoid this.
Thank you
"Niel" <nandip2k4@vippowernet.com> wrote in message
news:u$u6Ly#zDHA.1524@TK2MSFTNGP10.phx.gbl...processing> 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 transactionto> 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(duethe> some other error).
> If the reply is 1 then I redirect the user to final page where in inserterror> 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> 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
>
>
> "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
>
Niel Guest



Reply With Quote

