Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with Global.asa (Urgent!!!)

Status
Not open for further replies.

torga

Programmer
Apr 28, 2001
11
ES
I've written the following code in the global.asa to update the time the user close the session. The server returns the "HTTP 500 - Error" at any page. I can't find the problem!!!
How can I program it in JScript?

--------------- Global.asa file ----------------

<SCRIPT LANGUAGE=VBScript RUNAT=Server>
Sub Application_OnStart

End Sub

Sub Application_OnEnd

End Sub

Sub Session_OnStart

End Sub

Sub Session_OnEnd
Set Data = New Date

Set DB2 = Server.CreateObject (&quot;ADODB.Connection&quot;)
DB2.Mode = 3
DB2.Open (&quot;dsn=Audi;&quot;)

Set registre = Server.CreateObject(&quot;ADODB.Recordset&quot;)
registre.Open(&quot;Registre&quot;, DB2, 1, 2)

While Not registre.EOF
If registre (&quot;Id&quot;) = Session(&quot;IdReg&quot;) Then
registre.Edit
registre (&quot;DataSortida&quot;) = Data.getVarDate
registre.Update
End If
registre.MoveNext
Wend
registre.Close
End Sub

</SCRIPT>

---------------------------------------------------

Thanks for all!
 
The server returns the &quot;HTTP 500 - Error&quot; at any page??
Could you give one simple example of &quot;any page&quot;, so we can look at it.

However, Global.asa does not return any error message. I would take the code from Session_OnEnd to an asp file then run it to see if it works first.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top