I'm doing this for practice as I'm trying to learn ASP, here's the code:
<%
Dim adoConInfo
Dim strConInfo
Dim rsCommonInfo
Dim strSQLInfo
Dim intPlayerID
Dim strPlayerName
Dim strTeam
Dim strPosition
Dim strMore
Dim strPhoto
intPlayerID = CLng(Request.QueryString("Player"))
Set adoConInfo = Server.CreateObject("ADODB.Connection")
strConInfo = "DRIVER={Microsoft Access Driver (*.mdb)}; DBQ=d:\http root\test\db1.mdb"
adoConInfo.connectionstring = strConInfo
adoConInfo.Open
Set rsCommonInfo = Server.CreateObject("ADODB.Recordset")
strSQLInfo = "SELECT tlbProfile.Player_Name, tblProfile.Team, tblProfile.Position, tblProfile.More, tblProfile.Photo "
strSQLInfo = strSQLInfo & "FROM tblProfile WHERE tblProfile.PlayerID = " & intPlayerID & ""
rsCommonInfo.Open strSQLInfo, adoConInfo
If NOT rsCommonInfo.EOF Then
strPlayerName = rsCommonInfo("Player_Name")
StrTeam = rsCommonInfo("Team")
StrPosition = rsCommonInfo("Position")
strMore = rsCommonInfo("More")
strPhoto = rsCommonInfo("Photo")
End If
rsCommonInfo.Close
%>
and here's the error i'm getting:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E10)
[Microsoft][ODBC Microsoft Access Driver] Too few parameters. Expected 1.
/test/profile.asp, line 28