Hi guys,
First, my apologies, but I can't find a MS newsgroup for ASP and not
ASP.NET like this one
But here is my question
Set cnData = server.createOb ject("ADODB.Com mand")
Set rsData = server.createOb ject("ADODB.Rec ordSet")
' set the page size
rsData.PageSize = iPSize
rsData.CursorLo cation = adUseClient
' open the data
sSQL = " SELECT * FROM vATSlistaAssist encias " & _
" WHERE estado = 'ACTIVO' and estadoEsc not in ('FORA SERVICO', 'NAO
QUER', 'NAO TEM MAQUINA', 'OUTRA 2') and " & _
" idDistribuidorA ssistencia = @idDistAss and localidade like @localidade
" & _
" ORDER BY @coluna @ordem"
with cnData
.ActiveConnecti on = sConnCW
.CommandText = sSQL
.CommandType = adCmdText
.Parameters.App end = .CreateParamete r("@idDistAss ", adInteger,
adParamInput)
.Parameters.App end = .CreateParamete r("@localidade" , adVarChar,
adParamInput, 100)
.Parameters.App end = .CreateParamete r("@coluna", adVarChar, adParamInput,
100)
.Parameters.App end = .CreateParamete r("@ordem", adVarChar, adParamInput,
5)
.Parameters("@i dDistAss") = idDistAssistenc ia
.Parameters("@l ocalidade") = sLocalidade
.Parameters("@c oluna") = sColuna
.Parameters("@o rdem") = sOrdem
end with
set rsData = cnData.execute
cnData.ActiveCo nnection.Close
I got an Error regarding the @idDistAss is not define in the query
[Microsoft][ODBC SQL Server Driver][SQL Server]Must declare the variable
'@idDistAss'
But, as you can see, I have it defined in the sSQL variable...
What can I do? I'm really stuck here, please help me
--
Bruno Miguel Alexandre
Dep Informática do Grupo Filtrarte
Av General Humberto Delgado, 91
Vila Verde
2705-887 Terrugem SNT
Portugal
T. +351 219 608 130
F. +351 219 615 369
w. www.filtrarte.com
@. br***@filtrarte .com