<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!--#include file="../Connections/users.asp" -->
<%
Dim vote
Dim vote_numRows
Dim a, b, c, d
set conn=Server.CreateObject("ADODB.Connection")
conn.Provider="Microsoft.Jet.OLEDB.4.0"
conn.Open "c:/Inetpub/wwwroot/ado/db1.mdb"
Set vote = Server.CreateObject("ADODB.Recordset")
vote.ActiveConnection = MM_users_STRING
vote.Source = "SELECT All Voted, VotedYes FROM vote"
vote.CursorType = 0
vote.CursorLocation = 2
vote.LockType = 1
vote.Open "Vote", conn
Set a = vote("All Voted")
Set b = vote("Voted Yes")
Set c=a+1 (it give's me an "Exeption occurred error in this line.Why?")
Set d=b+1
vote_numRows = 0
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<%
if Request.Form("Yes")="checked" then
sql="UPDATE vote SET"
sql=sql & "All Voted='" & c & "',"
sql=sql & "Voted Yes='" & d & "',"
conn.Execute sql
else
sql="UPDATE vote SET"
sql=sql & "All Voted='" & c & "',"
sql=sql & "Voted Yes='" & b & "',"
conn.Execute sql
%>
</body>
</html>
<%
vote.Close()
end If
Set vote = Nothing
%>