scottrdj 0 Newbie Poster

There is probably an easy answer for this but I cant find it. I am based in the Uk and server is in the US. Differnce between server time and my time is 8 hours. When a customer order comes through it is in the US time and not mine, how can I change this. Also the date fromat is in mm/dd/yy how do I change this to dd/mm/yy.

Thanks on advance for anyones help.

Scott

scottrdj 0 Newbie Poster

you are a star thanks very much

scottrdj 0 Newbie Poster

It looks like the value returned for user id is bringing in the am or pm part of the time which is changing it from a number to a string, how can I change this?

Scott

scottrdj 0 Newbie Poster

Sorry it has taken me so long to reply it appears that the visitorid variable has to be a number it is configured in this code

if request.ServerVariables("HTTPS")="on" then
' if request.Cookies("Session").HasKeys then
' session("UserID")=request.Cookies("Session")("UserID")
' session("username")=request.Cookies("Session")("UserName")
' session("Email")=request.Cookies("Session")("Email")
' session("AccessLevel") = request.Cookies("Session")("AccessLevel")
' session("cWebsiteReferrer") = request.Cookies("Session")("cWebsiteReferrer")
' session("cWebsiteEntryPage") = request.Cookies("Session")("cWebsiteEntryPage")
' session("VisitorID") = request.Cookies("Session")("VisitorID")
' session("t")="y"
' end if
end if

'**********************************************
'* Session Management *
'**********************************************
if session("userid")="" then 'Make sure session("userid")=0 if it is empty
session("userid")=0
end if
if request("logout")="y" Then 'Perform logout and clear current session variables.
session("username")=cEmail_Guest
session("Email")=""
session("userid")=0
session("AccessLevel")=""
session("ActiveDisc")=""
response.Cookies("Session")("UserID")=0
response.Cookies("Session")("UserName")=""
response.Cookies("Session")("Email")=""
response.Cookies("Session")("AccessLevel") = ""
response.Cookies("Session").Expires=now()-1000
end if

Dim LoginLink, LogoutLink, LoginOutText, LoginOutBtn
if request.ServerVariables("QUERY_STRING") <> "" Then
LoginLink = "/login.asp?" & request.ServerVariables("QUERY_STRING") & "&returnpath=" & server.urlencode(request.ServerVariables("URL"))
LogoutLink = request.ServerVariables("URL") & "?" & request.ServerVariables("QUERY_STRING") & "&logout=y"
else
LoginLink = "/login.asp?returnpath=" & server.urlencode(request.ServerVariables("URL"))
LogoutLink = request.ServerVariables("URL") & "?logout=y"
end if
if session("userid")=0 Then
LoginOutText = "<a href=""" & LoginLink & """>EXISTING USER? LOG IN HERE</a>"
LoginOutBtn = "<a href=""" & LoginLink & """><img src=""/btn/login.gif"" border=""0""></a>"
else
LoginOutText = "<a href=""" & logoutLink & """ title=""You are currently logged in using " & session("username") & """>LOGOUT</a>"
LoginOutBtn = "<a href=""" & logoutLink & """ title=""You are currently logged in using " …

scottrdj 0 Newbie Poster

Hi thanks for that reply however the connection file looks like this checked the path and it looks correct to me, as far as I can see anyway

<!-- METADATA TYPE="typelib"
FILE="C:\Program Files\Common Files\SYSTEM\ADO\MSADO15.DLL" -->
<%
Dim strConnectOrder
strConnectOrder = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("..\databases\orders.mdb")
Dim strConnectProburn
strConnectProburn = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("..\databases\proburn.mdb")
Dim strConnectMembers
strConnectMembers = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("..\databases\Members.mdb")
Dim strConnectMailing
strConnectMailing = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & Server.MapPath("..\databases\mailing.mdb")
%>

scottrdj 0 Newbie Poster

Hi, I have a website that was developed a few years ago for me, site is proburn.com and has been happily running for a few years, however I have had to chnage hosts and I am now gwetting all sorts of errors. latest one is where a customer is trying to create a discs, yhis is also happening all over the site but if I can fix thsi I think the other errors will be the same.

here is the code and the full error is

Microsoft JET Database Engine error '80040e14'
Syntax error (missing operator) in query expression 'Description= "ss" AND visitorid= 2007271121302 AM0 AND IsInBasket=false'.
/proburn/createdisc.asp, line 50

<%
Option Explicit
Response.Buffer=true
'redirect code goes here


%>
<!--#include virtual="/inc_returntome.asp"-->
<!-- #include file="../tracker/tracker.asp"-->
<!-- #include file="inc_connections.asp"-->
<!-- #include file="../config.asp"-->
<%
Dim RST
Dim sqlStr
Dim redirectpage
Dim theStatus
Dim DiscName
Dim DiscDescription



if request("r")<>"" Then
redirectpage = request("r")
elseif request.form("r")<>"" Then
redirectpage = request.form("r")
else
redirectpage = "search.asp"
End If


if request.form("go")<>"" Then
MakeDisc()
if theStatus="" then
Response.Redirect redirectpage
End If
End IF
'==========================================================================================
function MakeDisc()


'   Response.write sqlstr & "<br>"
If  request.form("DiscName")<>"" Then DiscName = request.form("DiscName")
If  request.form("DiscDescription")<>"" Then DiscDescription = request.form("DiscDescription")



Set RST = Server.CreateObject("ADODB.Recordset")
if session("UserID")>0 Then
sqlStr = "select * from proburndisc where Description='" & replace(DiscDescription,"'","''") & "' AND userid=" & session("userid") & " AND IsInBasket=false"
else
sqlStr = "select * from proburndisc where Description='" & replace(DiscDescription,"'","''") & "' AND visitorid=" & session("visitorid") & " AND IsInBasket=false"
End If
'   response.write sqlstr
RST.Open sqlStr, strConnectProBurn, …