ASP, MySQL on Apache - Object doesn't support named arguments

I'm using ASP with MySQL on Apache

This script splits record output on a number of pages.

The Error:

Object doesn't support named arguments: 'RS.PageSize'
Object doesn't support named arguments: 'RS.CursorLocation'

The CODE:


<%'DATABASE CONNECTION%>

strConnection = "driver={MySQL};server=localhost;uid=USERNAME;pwd=PASSWORD;database=DATABASE;option=NUM"
      
<!--#include virtual="adovbs.inc" -->

<%

Page_Size = 30

If Request("Page")="" Then
Current_Page = 1
Else
Current_Page = CInt(Request("Page"))
End If

Set adoDataConn = Server.CreateObject("ADODB.Connection")
Set RS = Server.CreateObject("ADODB.Connection")

RS.CursorLocation = adUseClient
RS.PageSize = Page_Size



strQuery = "SELECT * FROM news ORDER BY tblNewsDate DESC"
RS.Open strQuery,adoDataConn, AdOpenStatic, adLockReadOnly, adCmdText

%>


<% Page_Count = RS.PageCount

If 1 > Current_Page Then Current_Page = 1
If Current_Page > Page_Count Then Current_Page = Page_Count

RS.AbsolutePage = Current_Page
%>


      <%Do while not RS.AbsolutePage = Current_Page AND NOT RS.EOF%>
            
DISPLAY records HERE
            
            <%RS.MoveNext%>
      <%Loop%>

       
DISPLAY LINKS TO OTHER PAGES IF RECORD OUTPUT >30

<%
RS.Close
adoDataConn.Close
%>
PanavisionAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PanavisionAuthor Commented:
Okay, I've added
AdUseClient = 3 in the adovbs.inc file

So, Object doesn't support named arguments: 'RS.CursorLocation'  NOW works
But still get error on PageSize:

Object doesn't support named arguments: 'RS.PageSize'
0
ThaSmartUnoCommented:
is this supposed to be RecordSet?

Set RS = Server.CreateObject("ADODB.Connection")

this

Set RS = Server.CreateObject("ADODB.RecordSet")
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
PanavisionAuthor Commented:
Thanks, that's solved one problem now I get this:

ADODB.Recordset error '800a0e7d'

The connection cannot be used to perform this operation. It is either closed or invalid in this context.
refers to:

RS.Open strQuery,adoDataConn, AdOpenStatic, adLockReadOnly, adCmdText
0
Cloud Class® Course: MCSA MCSE Windows Server 2012

This course teaches how to install and configure Windows Server 2012 R2.  It is the first step on your path to becoming a Microsoft Certified Solutions Expert (MCSE).

ThaSmartUnoCommented:
and if you write out strQuery its an actual query right?
0
PanavisionAuthor Commented:
The query is fine; it seems to be an issue with ASP and MySQL.
0
ThaSmartUnoCommented:
sorry I cant help anymore I haven't actually tried mysql and asp since I've always been able to use access, and has always been for a small site.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
ASP

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.