Results 1 to 2 of 2

Thread: Why??? Ohh God! Why my recordset don't work???

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 1999
    Location
    Juiz de Fora, MG, Brazil
    Posts
    30

    Post

    It's ok if you are not The God.

    But, really I don't understand because the recordset don't work. I'm try to execute the same SQL code in MS ACCESS (97) and this code works fine!!!

    Set rs = New ADODB.Recordset
    Set rs.ActiveConnection = cnConexao

    cSQL = ""
    cSQL = cSQL & "SELECT Boleto "
    cSQL = cSQL & "FROM Movimento "
    cSQL = cSQL & "WHERE Boleto LIKE '" & Format(Date, "yy") & Format(Date, "mm") & "*' "
    cSQL = cSQL & "ORDER BY Boleto DESC"

    rs.Open cSQL, cnConexao, adOpenKeyset

    If the SQL code is simple "SELECT * FROM Movimento", it's work!!! But if I use the LIKE and ORDER BY don't work!!!

    Do anybody help me!?!?!?!?

    Tkx from Brazil.

  2. #2
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844

    Post


    Replace your asterisk (*) with a percent sign (%) and knock yourself out!

    Tom

    you are welcome from USA

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width