ID
REGIAO
CATEGORIA
EMPRESA
TRABALHO
AGENCIA
No total existem 4 regiões e 14 categorias.
Então, quero exibir os dados e fiz o seguinte:
(INICIEI APENAS COM DUAS CATEGORIAS E UMA REGIÃO, DEPOIS VOU FAZER DAS 14 CATEGORIAS O CÓDIGO)
<!-- Início dos códigos Categoria: Campanha de Comunicação de Marketing--> <% set Conexao1=server.createobject("ADODB.connection") Set RS1 = Server.CreateObject("ADODB.RecordSet") Conexao1.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & server.MapPath("dados/db/bd_premio2007.mdb") SQL1 = "SELECT * FROM premio2007 WHERE categoria = 'Campanha de Comunicação de Marketing' AND regiao='"®iao&"' ORDER BY empresa ASC" RS1.open SQL1, Conexao1, 0, 1 %> <table width="450" border="0" align="center" cellpadding="5" cellspacing="0"> <tr bgcolor="#CC3300"> <td height="25" colspan="3"><div align="center"><%=rs1("categoria")%></div></td> </tr> <% While Not RS1.EOF %> <tr> <td width="33%"><%=rs1("empresa")%></td> <td width="33%"><%=rs1("trabalho")%></td> <td width="33%"><%=rs1("agencia")%></td> </tr> <% RS1.MoveNext Wend %> <% RS1.Close Set RS1 = Nothing Conexao1.Close Set Conexao1 = Nothing %> </table> <br> <hr size="1"> <br> <!-- Início dos códigos Categoria: Comunicação Integrada--> <% set Conexao2=server.createobject("ADODB.connection") Set RS2 = Server.CreateObject("ADODB.RecordSet") Conexao2.Open "Driver={Microsoft Access Driver (*.mdb)};DBQ=" & server.MapPath("dados/db/bd_premio2007.mdb") SQL2 = "SELECT * FROM premio2007 WHERE categoria = 'Comunicação Integrada' AND regiao='"®iao&"' ORDER BY empresa ASC" RS2.open SQL2, Conexao2, 0, 1 %> <table width="450" border="0" align="center" cellpadding="5" cellspacing="0"> <tr bgcolor="#CC3300"> <td height="25" colspan="3"><div align="center"><%=rs2("categoria")%></div></td> </tr> <% While Not RS.EOF %> <tr> <td width="33%"><%=rs2("empresa")%></td> <td width="33%"><%=rs2("trabalho")%></td> <td width="33%"><%=rs2("agencia")%></td> </tr> <% RS2.MoveNext Wend %> <% RS22.Close Set RS = Nothing Conexao2.Close Set Conexao2 = Nothing %> </table> <br> <hr size="1"> <br>
O seguinte erro está sendo apresentado:
Microsoft VBScript runtime error '800a01a8'
Object required: ''
/novo/premio2007/lista.asp, line 65
O que estou errando?