I have a need for a simple cookie. When a user clicks a link to vote I want the code to check for a cookie. if the value of the cookie is true, do not let the person vote (1 vote per person). Else allow the person to vote and place a cookie on their box.

My code doesn't seem to be working. Any thoughts?
VB Code:
  1. If IsDBNull(Request.Cookies("PplsChoice")) Then
  2.             Dim Cookie As New HttpCookie("PplsChoice")
  3.             Dim Item As String = Request.QueryString("i")
  4.             Dim cmd As New ExecuteCommand(AppSettings("cnn") & Server.MapPath("\GalleryCatalog\DataSource\TEST_auction_data.mdb"))
  5.  
  6.             'update catalog table
  7.             If cmd.SetData("UPDATE Catalog_tbl SET PplsChoiceTally = [pplschoicetally] + 1 WHERE ItemNumber = '" & Item & "'") Then
  8.                 'append cookie to flag the computer's vote
  9.                 Cookie.Expires = #4/16/2004#
  10.                 Cookie.Values.Add("Voted", "True")
  11.                 Response.Cookies.Add(Cookie)
  12.                 lblVote.Text = "Thank you for casting your vote for People's Choice the results will be determined on " & AppSettings("Date.PplsChoice")
  13.                 lblVote.ForeColor = Green
  14.             Else
  15.                 lblVote.Text = "We're sorry, your vote was not tallied, please try again. If the problem continues contact WITF to cast your vote."
  16.                 lblVote.ForeColor = Red
  17.             End If
  18.         Else
  19.             lblVote.Text = "We're sorry, our records show you have already casted a vote for People's Choice."
  20.             lblVote.ForeColor = Red
  21.         End If
  22.         lblVote.Visible = True