[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.0

ASP and SQL problem with sessions - Lose server temporarily.

Asked by HypercubeTech in Miscellaneous Web Development

We have a site w/shopping cart on Verizon's MySuperpages.com (don't ask). It was on Verizon (there's a difference appearently).

I didn't write it but I gotta fix it. On the new server when you go to the main page, index.asp, sometimes it doesn't come up and sometimes it does. Don't know if has anything to do with people using the cart or not.. I don't imagine there are more than 2 or 3 (if any) people on at any one time.  Code below:

index.asp basically says

include   SQL.asp   at the very top (which is also on all of the other pages)
include   links.asp
some html bs

and the SQL.asp is as follows, i think this is where the prob is.

SQL.asp (please remember i didn't write this, but could this asp be locking up the server intermittantly?)

<%

connectionInfo = "Provider=SQLOLEDB;UID=XXXXXX;PWD=XXXXX;Data Source=XX.XXX.XXX.XXX;"
'connectioninfo = "Provider=SQLOLEDB;UID=Matt;PWD=XXXXXX;Data Source=dsorce;Initial Catalog=WEBDB"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.ConnectionString=connectionInfo
Conn.Open

If session("ID") = "" Then
'*******************************************************      
'This sections returns the new Session ID

      cmdText = "Select * From primary_key"
      set rs = server.CreateObject("ADODB.recordset")
      rs.open cmdText, conn
      session("ID") = rs("sessions")      
      set rs = nothing
'******************************************************
'This section updates the new ID in the primary key table

      cmdText = "Select * From primary_key "
      set rs = server.CreateObject("ADODB.recordset")
      With rs
            .ActiveConnection = conn
          .CursorType = 2 'adOpenDynamic
          .LockType = 3 'adLockOptimistic
            .Open cmdText
      End With
      rs("sessions") = session("ID") + 1
      rs.update
      set rs = nothing      
'**********************************************************
'This is where the timestamp and ID gets set in the temp_IDs

      cmdText = "Select * From temp_IDs"
      set rs = server.CreateObject("ADODB.recordset")
      With rs
            .ActiveConnection = conn
          .CursorType = 2 'adOpenDynamic
          .LockType = 3 'adLockOptimistic
            .Open cmdText
      End With
      rs.addnew
      rs("ID") = session("ID")
      rs("timestamp") = Date
      rs.update
      set rs = nothing      
'********************************************************
'Here I check to see if the session number is more than
'1 day old and if it is I will delete it from the DB.

      cmdText = "Select * From temp_IDs"
      set rs = server.CreateObject("ADODB.recordset")
      rs.open cmdText, conn
      
      Do While not rs.eof
            strDateDiff = DateDiff("d",rs("timestamp"),Date)
            If strDateDiff > 1 Then
                  cmdText = "Delete From orders Where SessionID = " & rs("ID")
                  set rsDelete = server.CreateObject("ADODB.recordset")
                  rsDelete.open cmdText, conn
                  set rsDelete = nothing

                  cmdText = "Delete From addresses Where ID = " & rs("ID")
                  set rsDelete = server.CreateObject("ADODB.recordset")
                  rsDelete.open cmdText, conn
                  set rsDelete = nothing

                  cmdText = "Delete From payment Where ID = " & rs("ID")
                  set rsDelete = server.CreateObject("ADODB.recordset")
                  rsDelete.open cmdText, conn
                  set rsDelete = nothing
                  
                  cmdText = "Delete From userinfo Where ID = " & rs("ID")
                  set rsDelete = server.CreateObject("ADODB.recordset")
                  rsDelete.open cmdText, conn
                  set rsDelete = nothing

                  cmdText = "Delete From temp_IDs Where ID = " & rs("ID")
                  set rsDelete = server.CreateObject("ADODB.recordset")
                  rsDelete.open cmdText, conn
                  set rsDelete = nothing
            End If
            rs.movenext
      Loop
      set rs = nothing


      session("REFER") = request.servervariables("HTTP_REFERER")
      session("ADDR") = request.servervariables("REMOTE_ADDR")      
      Session.Timeout = 120
      
'      cmdText = ""
'      set rs = server.CreateObject("ADODB.recordset")
'      rs.open cmdText, conn
      
      
      
End If
%>

[+][-]05/09/06 05:09 PM, ID: 16644314Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/09/06 05:16 PM, ID: 16644331Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/09/06 05:28 PM, ID: 16644372Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/09/06 06:37 PM, ID: 16644607Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/09/06 09:30 PM, ID: 16645420Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]05/09/06 10:24 PM, ID: 16645594Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]05/10/06 03:42 AM, ID: 16647299Accepted Solution

View this solution now by starting your 30-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

About this solution

Zone: Miscellaneous Web Development
Sign Up Now!
Solution Provided By: dukestaTAI
Participating Experts: 5
Solution Grade: A
 
[+][-]05/10/06 04:11 AM, ID: 16647448Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05/16/06 09:42 AM, ID: 16692317Assisted Solution

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 30-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]06/11/06 07:55 PM, ID: 16882867Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]06/22/06 08:42 PM, ID: 16965857Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
[+][-]06/26/06 01:23 AM, ID: 16982241Administrative Comment

Experts Exchange has a courteous staff of administrators who help members get the most out of the website by means of administrative comments like this one.

Start your 30-day free trial to view this Administrative Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81