Well, I resolved my own issue...
 
I removed the word "Set" in the lines:
 
--Set objRecordset.CursorLocation
and
---Set objRecordset.CursorType
 
works like a charm...
 
Thanks

  _____  

From: [email protected]
[mailto:[EMAIL PROTECTED] On Behalf Of PAE
Sent: Tuesday, June 07, 2005 11:59 AM
To: [email protected]
Subject: [AspClassicAnyQuestionIsOk] last 3 news items from MySQL db - error
'800a01a8' "Object Required: 'CursorLocation' "


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]
<mailto:[EMAIL PROTECTED]
cribe> 
  

*       Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service
<http://docs.yahoo.com/info/terms/> . 




[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/
 


Reply via email to