PDA

Click to See Complete Forum and Search --> : Why??? Ohh God! Why my recordset don't work???


Emidio
Feb 5th, 2000, 12:02 AM
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.

Clunietp
Feb 6th, 2000, 06:15 AM
Replace your asterisk (*) with a percent sign (%) and knock yourself out! :D

Tom

you are welcome from USA