I'm getting the following error when I try to run a script...

Microsoft VBScript runtime error '800a000d'

Type mismatch

/default.asp, line 81

Code:
sql = "SELECT * FROM " & bannerstype Set rschanbanners = Server.CreateObject("ADODB.Recordset") rschanbanners.Open sql, conn, 3, 3 End Function %> <table width="600" cellpadding="5" cellspacing="0" bordercolor="black border="1" bgcolor="#3B3B3B" align="center" valign="middle"> <tr height="88"> <td width="394" align="center"> <table width="394" height="88" cellpadding="0" cellspacing="0" border="1" bordercolor="black" align="center" valign="middle"> <tr height="88" valign="middle"> <td> <a href="<%=rschanbanners("mainbanner")%>?console=<%=console%>"><img src="<%=console%>main.jpg" height="88" width="390" border="0" align="absmiddle"></a>
The variable bannerstype is this...

Code:
bannerstype = "main" & console & "banners"
I tested it and it sent the right variable. So what's wrong with my coding?

BTW, lime 81 is...

Code:
<a href="<%=rschanbanners("mainbanner")%>?console=<%=console%>"><img src="<%=console%>main.jpg" height="88" width="390" border="0" align="absmiddle"></a>
BTW, I have no primary key for the table. Does that matter in mysql?