ERRO CONSULTA SQL

MAFACILITY 29/03/2011 01:32:57
#369546
estou comesse código abaixo que esta dando o seguinte erro e não estou conseguindo resolver:

[txt-color=#e80000]Microsoft OLE DB Provider for ODBC Drivers erro [ô]80040e14[ô]

[Microsoft][Driver ODBC para Microsoft Access] Erro de sintaxe (operador faltando) na expressão de consulta [ô]categoria=[ô]Mulheres[ô] and tipo=[ô]Morenas e Mulatas[ô] and atendimento=[ô]Homens[ô] and regiao=[ô]Centro[ô] and anal=[ô]Sim[ô] and idade >= And idade <= 36[ô].[/txt-color]



<head>
<style type=[Ô]text/css[Ô]>
.style1
{
color: #FFCC00;
}
.style2
{
font-weight: bold;
}
.style3
{
height: 5px;
}
</style>
</head>
<meta http-equiv=[Ô]Content-Type[Ô] content=[Ô]text/html; charset=iso-8859-1[Ô]>
<body style=[Ô]background-color: #000000[Ô]>
<table width=[Ô]<%=tabwidth%>[Ô] cellspacing=[Ô]2[Ô] cellpadding=[Ô]1[Ô]
bgcolor=[Ô]<%= trback%>[Ô] bordercolorlight=[Ô]<%= mainborderlight%>[Ô]
bordercolordark=[Ô]<%= mainborderdark%>[Ô]>

<%
Dim objConn, objRs, strQuery, strConnection, txt_cat, txt_tipo, txt_at, txt_reg, txt_id1, txt_id2, txt_an, url_conexao, n

txt_cat = Request.Form([Ô]txt_cat[Ô])
txt_tipo = Request.Form([Ô]txt_tipo[Ô])
txt_at = Request.Form([Ô]txt_at[Ô])
txt_id = Request.Form([Ô]txt_id1[Ô])
txt_id2 = Request.Form([Ô]txt_id2[Ô])
txt_reg = Request.Form([Ô]txt_reg[Ô])
txt_an = Request.Form([Ô]txt_an[Ô])
[ô]Dim objConn, objRs, strQuery, strConnection, url_conexao

url_conexao = Server.MapPath([Ô]adm.mdb[Ô])
set objConn = Server.CreateObject([Ô]ADODB.Connection[Ô])
objConn.open [Ô]DRIVER={Microsoft Access Driver (*.mdb)};DBQ=[Ô]&url_conexao

[ô] objConn = Server.CreateObject([Ô]ADODB.Connection[Ô])
[ô]objConn.Open [Ô]DBQ=[Ô] & Server.MapPath([Ô]adm.mdb[Ô]) & [Ô];Driver={Microsoft Access Driver (*.mdb)}[Ô],[Ô]username[Ô],[Ô]password[Ô]

[ô]Seleciona da tabela contato
[txt-color=#0000f0]strQuery = [Ô]SELECT * From imovel where categoria=[ô][Ô] & txt_cat & [Ô][ô] and tipo=[ô][Ô] & txt_tipo & [Ô][ô] and atendimento=[ô][Ô] & txt_at & [Ô][ô] and regiao=[ô][Ô] & txt_reg & [Ô][ô] and an=[ô][Ô] & txt_an & [Ô][ô] and idade >= [Ô] & txt_id1 & [Ô] [Ô] & _
[Ô]And idade <= [Ô] & txt_id2 & [Ô] ORDER BY autonum asc[Ô][/txt-color]
objRs = objConn.Execute(strQuery)
%>
<%Set objrs = Server.CreateObject([Ô]ADODB.RecordSet[Ô])

objrs.MaxRecords = 100000
objrs.open strQuery,objConn %>

<%


Do While Not objRs.eof
%>
<tr>
<%
[ô]Dim n
n = 0

Do While n < 8 And Not objRs.eof

%>
<meta http-equiv=[Ô]Content-Type[Ô] content=[Ô]text/html; charset=iso-8859-1[Ô]>
<td width=[Ô]<%= tdwidth%>%[Ô] valign=[Ô]top[Ô]>
<center style=[Ô]color: #FF9900[Ô]>
<a href=[Ô]folder.asp?autonum=<%=objRs([Ô]autonum[Ô])%>[Ô]><img src=[Ô]<%=objRs([Ô]foto1[Ô])%>[Ô] alt=[Ô]<%=objRs([Ô]bairros[Ô])%>[Ô]
height=120

style=[Ô]border: medium solid #999999; background-color: #C0C0C0; width: 93px;[Ô]
border=[Ô]0[Ô] title=[ô]<%=objRs([Ô]bairros[Ô])%>[ô]></a><span class=[Ô]style53[Ô]
style=[Ô]font-family: Tahoma; color: #FFCC00; font-weight: normal; font-size: 10pt;[Ô]><br>
</span>
<span class=[Ô]style2[Ô]
style=[Ô]font-family: Tahoma; color: #FFCC00; font-size: 8pt;[Ô]>
<%=objRS([Ô]nome[Ô])%> <span class=[Ô]style1[Ô]>
<span class=[Ô]style2[Ô]




</span></span> </span> <span class=[Ô]style1[Ô]>
<span class=[Ô]style53[Ô]
style=[Ô]font-family: Tahoma; color: #FFCC00; font-weight: normal; font-size: 10pt;[Ô]>

<br />
</span>
<span class=[Ô]style53[Ô]
style=[Ô]font-family: Tahoma; color: #FFCC00; font-weight: normal; font-size: 10pt;[Ô]>
</center>
</td>
<%
objRs.Movenext()
n = n + 1
loop
%>
</tr>
<tr>
<td width=[Ô]<%= tdwidth%>%[Ô] valign=[Ô]top[Ô] class=[Ô]style3[Ô]>
</td>
</tr>
<%loop%>
MAFACILITY 29/03/2011 01:55:19
#369547
o problema acima estava em uma variavel ja acertei, mas agora está dando este erro :

[txt-color=#e80000]Microsoft OLE DB Provider for ODBC Drivers erro [ô]80040e10[ô]

[Microsoft][Driver ODBC para Microsoft Access] Parâmetros insuficientes. Eram esperados 1.
[/txt-color]
Tópico encerrado , respostas não são mais permitidas