Jump to content
Fórum Script Brasil
  • 0

Erro Apenas No Rs2.fields("hora").value


mestre fyoda

Question

erro : BOF OU EOF SÃO VERDADEIROS , OU O REGISTRO ATUAL FOI ...

campo_data.Caption = Date

Set rs = cn.Execute(" Select  * from Agendar_Consulta where data = CONVERT(CHAR,GETDATE(),103 ) ")

Set rs2 = cn.Execute(" Select * from Hora ")

Dim item As ListItem

   While Not rs.EOF

          If rs.Fields("hora").Value = rs2.Fields("hora").Value Then

           Set item = ListView.ListItems.Add(, , rs("hora"))

           item.ListSubItems.Add , , rs("data")

           item.ListSubItems.Add , , rs("tel_res")

           item.ListSubItems.Add , , rs("tel_com")

           item.ListSubItems.Add , , rs("nom_pac")

           rs.MoveNext

           rs2.MoveNext

          Else

           Set item = ListView.ListItems.Add(, , rs2("hora"))

           rs2.MoveNext

         End If

       Wend

       While Not rs2.EOF

            Set item = ListView.ListItems.Add(, , rs2("hora"))

           rs2.MoveNext

         Wend

End Sub

esse erro dá quando na tabela Agendar_Consulta no campo hora esta da seguinte maneira .

14:00

13:00

o erro da porque no 1 campo há um numero maior que nos outros abaixo .

como posso arrumar isso ?

se no campo da tabela estiver assim

13:00

14:00

funciona normalmente .

Link to comment
Share on other sites

1 answer to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



  • Forum Statistics

    • Total Topics
      152.1k
    • Total Posts
      651.8k
×
×
  • Create New...