Comments are available to members only. Sign up or Log in to view these comments.
Main Topics
Browse All TopicsI am using ASP.NET / VB.NET to access SQL Server 2000. I am accessing an table to insert / update which is heavily hit during peak hours of usage. The following is the piece of code which is does not consistently gives me the error. I had used DataAccessApp block provided by Microsoft. The piece of code is :
Public Function MakeOrder(ByRef OrderDetails As OrderInfo) As Boolean
Dim myCon As New System.Data.SqlClient.SqlC
Dim myTrans As SqlClient.SqlTransaction
Try
myCon.Open()
Dim sProcname As String = "CreateNewOrder_sp"
myTrans = myCon.BeginTransaction("Ma
paramOrderNo = New SqlParameter("@OUTI_ORDERN
paramOrderNo.Direction = ParameterDirection.Output
ParamExtn = New SqlParameter("@OUTI_EXTENS
ParamExtn.Direction = ParameterDirection.Output
SqlHelper.ExecuteNonQuery(
paramOrderNo, _
ParamExtn, _
'Other Parameters
)
' Call the detail section inserts
Dim DRow As DataRow
sProcname = "CreateNewOrderItems_sp"
For Each DRow In OrderDetails.DetailSection
SqlHelper.ExecuteNonQuery(
'Other Parameters
)
Next
' Everything works fine, commit the changes.
myTrans.Commit()
Return True
Catch Ex As Exception
' Rollback the transaction
myTrans.Rollback("MakeOrde
Throw Ex
Finally
myCon.Close()
End Try
Emd Function
==========================
During Peak hours I get the following Error Message
==========================
Server Error in '/OrderEntry' Application
This SqlTransaction has completed; it is no longer usable.
Description:An unhandled excepion occured during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details:System.InvalidOper
==========================
The problem is this does not happen consistently and we are not able to identify what the problem is to fix. We were able to see a lot of locks during the process and some times few users blocked each other, but there was never a deadlock situation. Can anyone provide light on what is going wrong.
Thanks
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
Business Accounts
Answer for Membership
by: cdillonPosted on 2003-02-07 at 19:37:31ID: 7907119
Comments are available to members only. Sign up or Log in to view these comments.