Hi,
i have a dilema....
I have a script that is for a page that displays after members of my database insert their username and password, i.e a successful password entry page from which to navigate. For the majority of the people who use the site there is no problem. However, 'Some' members are finding difficulty entering the site (seems odd?). the error reads:
Microsoft OLE DB Provider for ODBC Drivers error '80040e14'
[Microsoft][ODBC Microsoft Access Driver] Syntax error (missing operator) in
query expression 'Ref ='.
/passsuccess.asp, line 21
Not everyone has this problem?? Everyone uses different computers to access the site. Someone recently suggested that many firewalls (especially 'zone alarm') block ASP scripts and this could be the cause of the problem. is this true??... what can i do if it is??
Alternatively, i fear it may be my script.... although it works in general it may need tweeking for universal acceptance.
PLEASE can someone of vaster intellect than myself find the time to spread the wealth? it will make me very happy and allow me to sleep at night. The script is as follows:
<%@LANGUAGE="VBSCRIPT"%>
<%
if(session("ref") <> "") then update__str = session("ref")
%>
<%
if(session("ref") <> "") then uptime__str = session("ref")
%>
<%
set update = Server.CreateObject("ADODB.Command")
update.ActiveConnection = MM_yearbook_STRING
update.CommandText = "UPDATE Students SET lastvisit = date() WHERE Ref = " + Replace(update__str, "'", "''") + " "
update.CommandType = 1
update.CommandTimeout = 0
update.Prepared = true
update.Execute() ..................NOTE: THIS IS THE INFAMOUS LINE 21!!!!
%>
<%
set uptime = Server.CreateObject("ADODB.Command")
uptime.ActiveConnection = MM_yearbook_STRING
uptime.CommandText = "UPDATE Students SET lasttime = time() WHERE Ref = " + Replace(uptime__str, "'", "''") + " "
uptime.CommandType = 1
uptime.CommandTimeout = 0
uptime.Prepared = true
uptime.Execute()
%>
<%
'Set FS=Server.CreateObject("Scripting.FileSystemObject ")
'Set RS=FS.OpenTextFile(Server.MapPath("counter.txt"), 1, False)
'fcount=RS.ReadLine
'RS.Close
'fcount=fcount+1
'This code is disabled due to the write access security on our server:
'Set RS=FS.OpenTextFile(Server.MapPath("counter.txt"), 2, False)
'RS.Write fcount
'RS.Close
'Set RS=Nothing
'Set FS=Nothing
%>
<%
Session("username") = cStr(Request("username"))
'MagicBeat Server Behavior - 1013 - by Jag S. Sidhu -
www.magicbeat.com
%>
<link rel="stylesheet" href="uni.css" type="text/css">
<title>Uniyearbooks</title><body background="fullsizebktop.jpg" link="#CC0000" vlink="#CC0000" alink="#CC0000" text="#CCCCCC">
<table width="728" height="492" border="0" align="center" cellpadding="0" background="whitebk.gif">
<tr>
<td height="116" align="left" valign="top"> <div align="right">
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/...version=5,0,0,0" width="356" height="116" align="left">
<param name="movie" value="julylogo2003.swf">
<param name="quality" value="high">
<embed src="julylogo2003.swf" width="356" height="116" align="left" quality="high" pluginspage="http://www.macromedia.com/shockwave...=ShockwaveFlash" type="application/x-shockwave-flash"></embed></object>
</div></td>
<td width="120" valign="top"> </td>
<td width="120" valign="top"> </td>
<td width="120" valign="top"> </td>
</tr>
<tr>
<td height="370" colspan="4" align="center" valign="top"> <div align="left">
<table width="90%" align="center">
<tr>
<td width="35%" height="43">
<script language="Javascript">
<!--
// Array of day names
var dayNames = new Array("Sun","Mon","Tues","Wed","Thur","Fri","Sat") ;
// Array of month Names
var monthNames = new Array( "January","February","Maruary","Apruary","Maytembe r","Junember","Jewelery","Auganbery","Septober","O ctopus","Novembish","Dechrimble");
// patched for y2k bug!
var now = new Date();
var year = now.getYear()
document.write(dayNames[now.getDay()] + ", " + monthNames[now.getMonth()] + " " + now.getDate());
// -->
</script>
</td>
<td width="65%"><%= Session("user") %>,</td>
</tr>
<tr>
<td height="168" valign="top"><img src="awelcome.gif" width="190" height="120"></td>
<td rowspan="2" valign="top"><p align="justify"><strong>Thankyou
for logging onto this year's CARDIFFYEARBOOK.
We are glad you have become part of this new and exciting service.
</strong> </p>
<p align="justify">In
order for the yearbook to prove a success we would be grateful
if you could ensure that you have entered your details into the
database. Remember, your friends will want to read what you have
written about yourself as much as you would like to read what
they have written. </p>
<p align="justify"><strong>Please
<a href="add.asp">Click-Here</a>
to view your current profile before proceeding to the home page.</strong></p>
<p align="justify">Thankyou
for your support and we hope you enjoy the site...</p>
<p align="justify"> </p>
<p align="right"><strong><strong><a href="<A href="mailto:
[email protected]"><img">mailt o:
[email protected]"><img src="envelope%20wiv%20writtin.jpg" width="310" height="30" border="0" align="right"></a></strong></strong></p></td>
</tr>
<tr>
<td height="122"><blockquote>
<p align="justify"> </p>
</blockquote>
<blockquote>
<p align="justify"> </p>
</blockquote></td>
</tr>
</table>
</div>
<div align="center"></div></td>
</tr>
</table>
<table width="699" border="0" align="center" background="fullsizebkbottom.gif">
<tr>
<td width="81%" height="80" rowspan="2"> </td>
<td width="19%" height="51" valign="bottom"><div align="right"><em>A
Sitebeyondsite production ©Crocker 2004</em></div></td>
</tr>
<tr>
<td height="58" valign="bottom"> </td>
</tr>
</table>