ORDER BY error:

djh

Registered User.
Local time
Today, 09:50
Joined
Jul 19, 2000
Messages
16
Weird... I'm totally baffled.

If I put in an ORDER BY clause in my SQL statement, I get an error:

"Method 'Open' of object ' Recordset failed"

If I don't put the ORDER BY clause, it works fine.

Here's what I'm using:

Code:
Set rst=New ADODB.recordset
strSQL="SELECT temp.* FROM temp ORDER BY temp.size;"

With rst
.activeConnection=currentProject.Connection
.CursorType=adOpenKeyset
.LockType=adLockOptimistic
.Open strSQL
End With

Same thing with [temp].[size]....

Help??
 
Never mind, i put the field names in brackets and the clause in paranthesis, and it worked...
 

Users who are viewing this thread

Back
Top Bottom