?
Solved

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

Posted on 2005-03-05
8
Medium Priority
?
310 Views
Last Modified: 2008-03-10
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
%>
0
Comment
Question by:Panavision
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
8 Comments
 

Author Comment

by:Panavision
ID: 13466222
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
 
LVL 10

Accepted Solution

by:
ThaSmartUno earned 400 total points
ID: 13466317
is this supposed to be RecordSet?

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

this

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

Author Comment

by:Panavision
ID: 13466588
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 10

Expert Comment

by:ThaSmartUno
ID: 13466648
and if you write out strQuery its an actual query right?
0
 

Author Comment

by:Panavision
ID: 13470495
The query is fine; it seems to be an issue with ASP and MySQL.
0
 
LVL 10

Expert Comment

by:ThaSmartUno
ID: 13480431
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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
This demonstration started out as a follow up to some recently posted questions on the subject of logging in: http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28634665.html and http://www.experts-exchange.com/Programming/…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question