Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Fabio Rodrigo

Erro na busca quando não ha o registro no banco

Recommended Posts

Boa tarde pessoar!!!

Estou com um pequeno problema estou fazendo uma busca por texto mas esta dando o seguinte erro.

ADODB.Recordset error '800a0bb9'

 

Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

 

/v1/inc/inc_lista.asp, line 82

esta é a variavel que esta recebendo os resultados:

if(trim(request("pesq_produto"))<>"")thenrsList.filter = " DSC_PRODUTO like '%"&trim(request("pesq_produto"))&"%'" end ifstdListagem = rsList.recordcount

tem uma inclusão do arquivo inc_lista no final que contem:

Function getListNoRow()Dim sRetorno sRetorno = "<span class='submenu'>Nenhum registro cadastrado no banco de dados </span>"getListNoRow = sRetornoEnd Functionfunction getItemRow(sTexto)dim sItemif bFlgCountEvenOdd thensClasse = "tblFormPar" elsesClasse = "tblFormImpar" end ifsItem = "<td height=20 class=" & sClasse & ">" & sTexto & "</td>"getItemRow = sItemend function
<% DoIf EmptyRecordset Then Exit DoIf RecordsProcessed = PageSize Then Exit DoIf Not FirstPass ThenrsList.MoveNextElseFirstPass = FalseEnd IfIf rsList.EOF Then Exit DoRecordsProcessed = RecordsProcessed + 1%><%=getListRow(rsList)%><%bFlgCountEvenOdd = not bFlgCountEvenOddRowCount = RowCount + 1Loop %>
mas de forma nenhum ele cai no getListNoRow, eu tenho de tratar o erro ao meu ver no outro form antes de gerar a lista alguém tem alguma sugestão estou aprendendo asp eu conheço a mesma somente no dot.net por tanto não conheço bem as propriedades para trabalhar o resultado da busca.

 

 

function getItemHeader(sTexto, sTam)

dim sItem

sItem = "<td width='" & sTam & "'>" & sTexto & "</td>"

getItemHeader = sItem

end function

Function getListNoRow()

Dim sRetorno

sRetorno = "<span class='submenu'>Nenhum registro cadastrado no banco de dados </span>"

getListNoRow = sRetorno

End Function

 

dim bFlgCountEvenOdd

bFlgCountEvenOdd = true

 

function getItemRow(sTexto)

dim sItem

if bFlgCountEvenOdd then

sClasse = "tblFormPar"

else

sClasse = "tblFormImpar"

end if

sItem = "<td height=20 class=" & sClasse & ">" & sTexto & "</td>"

getItemRow = sItem

end function

 

function getItemHidden(sNome, sValor)

dim sItem

sItem = "<input type='hidden' name='" & sNome & "' value=""" & sValor & """>" & chr(13) & chr(10)

getItemHidden = sItem

end function

 

dim strAction, sQString

If Request.QueryString <> "" Then

sQString = "?" & Request.QueryString & "&"

else

sQString = "?"

End If

strAction = Request.ServerVariables("PATH_INFO") & sQString & "t=" & Server.URLEncode(now)

 

dim EmptyRecordset, FirstPass, NeedRecordset, RecordsProcessed, StartRecord

dim PageSize, PagingMove, ListAbsolutePage, PageCount, RecordCount

dim iCount, RowCount

dim sClasse

 

sClasse = "tblFormImpar"

 

REM -- set flag defaults

EmptyRecordset = False

FirstPass = True

NeedRecordset = False

 

REM -- initialize page variables

RecordsProcessed = 0

PageSize = stdListagem

 

REM Get the page we are on

ListAbsolutePage = Request("ListAbsolutePage")

PageCount = Request("PageCount")

if IsNull(ListAbsolutePage) then

ListAbsolutePage = 1

else

if Trim(ListAbsolutePage) = "" then

ListAbsolutePage = 1

else

ListAbsolutePage = Cint(ListAbsolutePage)

end if

end if

 

REM -- load recordset

rsList.CacheSize = stdListagem

Compartilhar este post


Link para o post
Compartilhar em outros sites

Esse erro normalmente é por causa de tipos incompativeis ou por tentar "andar" mais do que o número de dados do RecordSet.

 

Poste parte do código até a linha do erro que é apresentado.

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.