Current location: Hot Scripts Forums » Programming Languages » ASP » waiting response emergency


waiting response emergency

Reply
  #1 (permalink)  
Old 06-18-04, 05:21 PM
sercim sercim is offline
New Member
 
Join Date: Jun 2004
Location: Turkey, Istanbul
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
waiting response emergency

<%
ip = Request.ServerVariables("REMOTE_ADDR")
getInfos os, browser
Session.LCID = 1033
dateLimit = DateAdd("n", -1 * dk_g, Now())
Set checkForIp = objConn.Execute("SELECT * FROM ZIYARETCI WHERE IP = '"& ip &"'")
If Session("Oturum") <> "Acik" Then
If checkForIp.EOF Then
Set addIP = Server.CreateObject("ADODB.RecordSet")
addIP.Open "SELECT * FROM ZIYARETCI", objConn, 3, 3
addIP.AddNew
addIP("IP") = ip
addIP("TARIH") = Date()
addIP("OS") = os
addIP("BROWSER") = browser
addIP.Update
Else
Set updIP = objConn.Execute("UPDATE ZIYARETCI SET TARIH = "& Now() &" WHERE IP = '"& ip &"'")
Set updOS = objConn.Execute("UPDATE ZIYARETCI SET OS = '"& os &"' WHERE IP = '"& ip &"'")
Set updBR = objConn.Execute("UPDATE ZIYARETCI SET BROWSER = '"& browser &"' WHERE IP = '"& ip &"'")
End If
Else
Set updtIP = objConn.Execute("UPDATE UYELER SET L_IP = '"& ip &"' WHERE U_ID = "& Session("Uye_Id"))
Set updtOS = objConn.Execute("UPDATE UYELER SET OS = '"& os &"' WHERE U_ID = "& Session("Uye_Id"))
Set updtBR = objConn.Execute("UPDATE UYELER SET BROWSER = '"& browser &"' WHERE U_ID = "& Session("Uye_Id"))
End If

Set delIP = objConn.Execute("DELETE FROM ZIYARETCI WHERE TARIH <= #"&dateLimit&"#")
Set objTotals = Server.CreateObject("ADODB.RecordSet")
objTotals.Open "SELECT * FROM ZIYARETCI WHERE TARIH >= #"&dateLimit&"# ORDER BY TARIH DESC", objConn, 3, 3
total = objTotals.RecordCount
Session.LCID = lcid
Session.LCID = 1033
dateToProcess = DateAdd("d", -1 * 3, Now())
Set delOldMems = objConn.Execute("DELETE FROM UYELER WHERE ACTIVE = 0 AND P_ADMIN = 0 AND U_TARIHI < #"&dateToProcess&"#")
Session.LCID = lcid
If Session("Oturum") = "Acik" Then
Session.LCID = 1033
Set UpdDate = objConn.Execute("UPDATE UYELER SET SON_TARIH=#"&NOW()&"# WHERE U_ID="&Session("Uye_Id")&"")
Session.LCID = lcid

Set objLevel = objConn.Execute("SELECT * FROM UYELER WHERE U_ID = "& Session("Uye_Id"))

If Not objLevel.EOF Then

If objLevel("SEVIYE") = 0 Then
Session("Uye_Seviye") = "0"
ElseIf objLevel("SEVIYE") = 1 Then
Session("Uye_Seviye") = "1"
Else
Session("Uye_Seviye") = "0"
End If
End If
End If

Function editBr(str)
str = Replace (str, vbCrLf, "<br>", 1, -1, 1)
editBr = str
End Function

Function duz(Str)
Str = Replace(Str, "<", "&lt;", 1, -1, 1)
Str = Replace(Str, ">", "&gt;", 1, -1, 1)
Str = Replace(Str, vbCrLf, "<br>", 1, -1, 1)
Str = Replace(Str, " ", " &nbsp;", 1, -1, 1)
Str = Replace(Str, " ", " &nbsp; ", 1, -1, 1)
duz = Str
End Function
%>
-------------------------------------------------------------------------------------------------------
This code sometimes work sometimes not.... The line which is caused to trouble is red line. And the error statement is this :
"Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in query expression '6/19/2004 12:38:17 AM'.
/web/site/dahil.asp, line 102"

(Red Line is line 102)
When it comes to my question how could be this code snippet or page sometime works and sometime does not work, i cant understand ?
If you assist to me i will be grateful...
Thank for everything from now...
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamic response redirect germ ASP 5 12-11-03 10:36 PM
your links waiting validation mukul HotScripts Site Bug Reports 1 11-16-03 03:22 AM
Global.asa blocks ASP response HenkBaas ASP 1 10-18-03 06:55 AM


All times are GMT -5. The time now is 02:58 PM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.