I am attempting to pull the last three news items from a MySQL database and
print them on the page. I am getting this error:
--- Microsoft VBScript runtime error '800a01a8'
--- Object required: 'CursorLocation'
--- /lastnews.asp, line 23
Here is the relevant snippet of code:
---strConn=("Driver={MySQL ODBC 3.51 Driver}; Server=localhost;
Database=<snip>; UID=<snip>; PWD=<snip>; Option=3")
---strSQL=("Select * from news;")
---Set objConn=Server.CreateObject("ADODB.Connection")
---Set objRecordset = Server.CreateObject("ADODB.Recordset")
---
---objConn.OPEN strConn
---
---Set objRecordset.ActiveConnection = objConn
---Set objRecordset.CursorLocation=3
---Set objRecordset.CursorType=3
---
---objRecordset.Open(strSQL)
---objRecordset.MoveLast
--- for each x in objRecordset.fields
--- response.write(x)
--- response.write("<br />")
--- next
---objRecordset.MovePrevious
--- for each x in objRecordset.fields
--- response.write(x)
--- response.write("<br />")
--- next
---objRecordset.MovePrevious
--- for each x in objRecordset.fields
--- response.write(x)
--- response.write("<br />")
--- next
--- objRecordset.Close
--- Set objRecordset = nothing
--- objConn.Close
--- Set objConn = nothing
Why am I getting this error? am I doing something wrong in the connection
or recordset?
Thanks for any help you can give...
Pete
[Non-text portions of this message have been removed]
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/AspClassicAnyQuestionIsOk/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/