You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
605 B

Imports System
Imports System.Data.OleDb
Public Class vb_Vote
Inherits OboutInc.oboutAJAXPage
Public Function onVote(ByVal qNr As Int32, ByVal aNr As Int32, ByVal nrOfAnswers As Int32) As String
Dim result As String = qNr.ToString()
Dim q(nrOfAnswers + 1) As Int32
' connect to the database
Dim myConn As OleDbConnection = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + Server.MapPath("../App_Data/vote.mdb") + ";User Id=Admin;Password=;")
Dim myComm As OleDbCommand
myConn.Open()
' add 1 vote to the answer chosen