<!--#include file="..\forum/common.asp" -->
<!--#include file="check_permission.asp" -->
<%
'Dimension variables
Dim Conn 'Holds the Database Connection Object
'Dim strSQL 'Holds the SQL query for the database
'Create an ADO connection odject
Set Conn = Server.CreateObject("ADODB.Connection")
'Set an active connection to the Connection object using a DSN-less connection
Conn.Open "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=" & Server.MapPath("?????.mdb")
%>
<!--#include file="check_voted.asp" -->
Here is the include file:
<%
Dim rsVoted
Dim SQL
set rsVoted = Server.CreateObject("ADODB.Connection")
SQL= "SELECT COUNT(*) FROM ratings WHERE UserName='" & strLoggedInUsername & "'"
rsVoted.Open SQL, conn
IF rsVoted.Fields(0).Value <> 0 then
Response.Redirect "http://www.p-15.com/team_ratings/voted.asp"
END IF
rsVoted.close
set rsVoted = nothing
%>
I get this error
Microsoft OLE DB Provider for ODBC Drivers error '80040e4e'
Operation was canceled.
/Team_Ratings/check_voted.asp, line 9
Any ideas I am trying to check and see if this user had vote in the poll already. We you vote I store the username with it. I want to check and see if the username is in the database. If so then redirect them to another page.
Hope someone can help me.