VB Code:
  1. Try
  2.             If Application("Connection") Is Nothing Then
  3.                 Dim mySQLConnStr As String = "Driver={MySQL};" & _
  4.                                             "Server=209.61.188.54;" & _
  5.                                             "Port=3306;" & _
  6.                                             "Option=131072;" & _
  7.                                             "Stmt=;" & _
  8.                                             "Database=wildhorse;" & _
  9.                                             "Uid=script;" & _
  10.                                             "Pwd=php_script;"
  11.  
  12.                 Dim cn As OdbcConnection = New OdbcConnection(mySQLConnStr)
  13.                 Application("Connection") = cn
  14.                 cn.Open()
  15.  
  16.                 Dim cmd As New OdbcCommand("SELECT * FROM tblSpecialEvents", cn)
  17.                 Dim ret As Object = cmd.ExecuteScalar()
  18.                 Dim rs As New OdbcDataReader()' error
  19.                 Response.Write(rs.GetValue(0))
  20.                 If Not IsDBNull(ret) Then Application("Visitors") = CInt(Val(ret))
  21.             End If
  22.         Catch ex As OdbcException
  23.             Application("Connection") = Nothing
  24.             Application("ConnectionError") = ex.Message
  25.         End Try

This says i cant assign rs as new OdbcDatareader becasue its in a private sub...? I dont get it... Also is 'Dim rs As New OdbcDataReader()' that what i should use to get data from a recordset? Or is there something in the command object i should use? Argg i'm so confused..