I am getting a declaration Expected error on my connection string I don't know what it could possibly be?
Code:
<Script Runat="Server">
Dim Conn
Dim SQL
Dim dbcomm, dbreader
Dim Headers as String
Conn=New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & server.mappath("datas/Wiffle.mdb"))
Conn.Open()
Select Case UCase(Request.QueryString("type"))
Case "HR"
SQL="SELECT PlayerInfo.*, Statistics.* FROM PlayerInfo INNER JOIN Statistics ON PlayerInfo.PlayerID = Statistics.PlayerID Order By HR DESC, LastName, FirstName, Hits, AtBats, Pic, Song, HittingDesc, FieldingDesc, Description, Statistics.PlayerID, PlayerInfo.PlayerID, [Pitching K's] "
Headers="Home Run Leaders"
Case "BA"
SQL="SELECT PlayerInfo.*, Statistics.* FROM PlayerInfo INNER JOIN Statistics ON PlayerInfo.PlayerID = Statistics.PlayerID Order By [Hits]/[AtBats] DESC, Hits, LastName, FirstName, AtBats, HR, Pic, Song, HittingDesc, FieldingDesc, Description, Statistics.PlayerID, PlayerInfo.PlayerID, [Pitching K's] "
Headers="Batting Average Leaders"
Case "SO"
SQL="SELECT PlayerInfo.*, Statistics.* FROM PlayerInfo INNER JOIN Statistics ON PlayerInfo.PlayerID = Statistics.PlayerID Order By [Pitching K's] DESC, LastName, FirstName, Hits, AtBats, HR, Pic, Song, HittingDesc, FieldingDesc, Description, Statistics.PlayerID, PlayerInfo.PlayerID"
Headers="Strike Out Leaders"
Case Else
SQL="SELECT PlayerInfo.*, Statistics.* FROM PlayerInfo INNER JOIN Statistics ON PlayerInfo.PlayerID = Statistics.PlayerID Order By HR, LastName, FirstName, Hits, AtBats, Pic, Song, HittingDesc, FieldingDesc, Description, Statistics.PlayerID, PlayerInfo.PlayerID, [Pitching K's] "
Headers="Home Run Leaders"
End Select
dbcomm= New OleDbCommand(SQL,Conn)
dbreader=dbcomm.ExecuteReader()
players.DataSource=dbreader
players.DataBind()
dbreader.Close()
Conn.Close()