Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old May 8th, 2006, 10:05 AM
Registered User
 
Join Date: May 2006
Location: , , .
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Wrong argument types

Hi im really new to this asp lark and wondered if anyone could give me some help. I keep getting ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/MyWeb/inc_menu.asp, line 13.


<%
Dim CaseStudy__MMColParam
CaseStudy__MMColParam = "y"
If (Request("MM_EmptyValue") <> "") Then
  CaseStudy__MMColParam = Request("MM_EmptyValue")
End If
%>
<%
Dim CaseStudy
Dim CaseStudy_numRows

Set CaseStudy = Server.CreateObject("ADODB.Recordset")
CaseStudy.ActiveConnection = MM_AdminandIntra_STRING
CaseStudy.Source = "SELECT * FROM tblCaseStudy WHERE csFeatured = '" + Replace(CaseStudy__MMColParam, "'", "''") + "'"
CaseStudy.CursorType = 0
CaseStudy.CursorLocation = 2
CaseStudy.LockType = 1
CaseStudy.Open()

CaseStudy_numRows = 0

Reply With Quote
  #2 (permalink)  
Old May 8th, 2006, 12:53 PM
Friend of Wrox
 
Join Date: May 2006
Location: San Diego, CA, USA.
Posts: 643
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I suspect that the value in your MM_AdminandIntra_STRING variable is empty or incorrect...

This error message can show up in several ways, and this is one of them.

Hope that helps

Woody Z http://www.learntoprogramnow.com
Reply With Quote
  #3 (permalink)  
Old November 9th, 2006, 04:59 AM
Registered User
 
Join Date: Nov 2006
Location: Manila, , Philippines.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Can someone help me with my code?

I've been trying to fix it for two days and nothing happened.
It always gives me the same error:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.

And it says that there is something wrong with line 4.

I am using two files here. The first one is an asp file (expprof.asp) which includes a database connection file (<!--#include file="dbconnect.asp">). And another file (expeduc.asp) which is also included in the first file (<!--#include file="expeduc.asp">).
What I want is for expeduc.asp to display information from the database, that is, if the database contains the "id" of the person displayed in expprof.asp, otherwise, display an ADD form to add information related again, to the person displayed in expprof.asp

<%
  Set rsNum = Server.CreateObject("ADODB.Recordset")
  numSQL = "select * from educations where exp_id = " & Request.QueryString("id") & ";"
  rsNum.Open numSQL, adoCon, 3, 3 ---> this line is said to have the error

  'count the number of records the person has in the educations table
  cnt = rsNum.RecordCount

  'if there are no records then the system must require the user to enter the information in the form below
  If (cnt < 1) Then
  %>
    <form name="addeduc" action="expeduc.asp?inc=1&id=<% Request.QueryString("id") %>&view=1" method="post">
    <table align="center">
     <tr><td align="center" colspan="2">Education</td></tr>
     <tr><td colspan="2"></td></tr>
     <tr>
      <td>Education:</td>
      <td><input type="text" name="educ" size="30"></td>
     </tr>
     <tr><td colspan="2" align="center"><input type="submit" name="Submit" value="Add"></td></tr>
    </table>
    </form>
  <%
     Set rsEduc = Server.CreateObject("ADODB.Recordset")
     educSQL = "select * from educations"
     rsEduc.Open educSQL, adoCon, 2, 3
     rsEduc.AddNew
     rsEduc.Fields("exp_id") = Request.QueryString("id")
     rsEduc.Fields("education") = Request.Form("educ")
     rsEduc.Update
     'rsEduc.Close
     'Response.Redirect("expeduc.asp")
     'Response.Write("Add Something")
  Else
     'display the Education when there is a record found in the database
     Response.Write(rsNum.Fields(2))
  End If
%>
Reply With Quote
  #4 (permalink)  
Old November 9th, 2006, 10:29 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Remove your cursor and lock and see if you can execute the query.

e.g. change this:
rsNum.Open numSQL, adoCon, 3, 3

to this:
rsNum.Open numSQL, adoCon

-------------------------
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.

^^Thats my signature
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
ByRef Argument! Apocolypse2005 Beginning VB 6 11 August 9th, 2007 02:21 PM
Argument not Optional aziaraphale Excel VBA 5 August 1st, 2007 02:53 AM
rows(argument) dabith Excel VBA 2 June 13th, 2004 06:13 AM
Invalid Argument.... baNTON Access VBA 4 April 27th, 2004 06:18 AM
Tablename argument chloe Access VBA 7 March 24th, 2004 12:20 AM



All times are GMT -4. The time now is 09:32 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.