Tuesday, July 17, 2007

Object doesn't support this property or method: 'EOF'

Happens when you forgot to use SET when assigning an object to a variable, e.g.: 
 
    set conn = CreateObject("ADODB.Connection") 
    conn.open "<connection string>" 
    rs = conn.execute("SELECT columns FROM table") 
    if not rs.eof then ' error here 
    ' .. 
 
The line starting with "rs = " should start with "SET rs = " ...

No comments: