Wrox Programmer Forums
|
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 software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 22nd, 2003, 02:35 PM
Authorized User
 
Join Date: Aug 2003
Posts: 31
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADODB Recordset

Error Type:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/clearance/addnewPOP.asp, line 33

CODE
32 Set objRS1 = Server.CreateObject("ADODB.Recordset")
33 objRS1.Open "Room", objConn, , 3, 2
34 Do while not (objRS1.EOF or (bolfound = "true"))

I'm not using adovbs.inc, but I want the values for the last three to be (blank), adLockOptimistic, and adCmdTable. Anyone see any problem in this code, or a reason it would send an error from that point?

 
Old September 22nd, 2003, 03:32 PM
Authorized User
 
Join Date: Aug 2003
Posts: 83
Thanks: 0
Thanked 0 Times in 0 Posts
Default

is it possible that you have a variable declared in your script with the same name as the table in your backend (Room)? Is Room a reference to a Table or an sql statement? I'm quite certain you have an SQL problem here either its the SQL that you created or the Room table/query on the backend doesn't exist. Another possibility is that you have an SSI declaring Room as a variable, be sure to use <%Option Explicit%>
 
Old August 13th, 2004, 08:27 PM
Registered User
 
Join Date: Aug 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

please replace line 33 with following
objRS1.Open "Room", objConn,1,2

I hope this should solve the issue :)

Saurabh
 
Old August 13th, 2004, 08:28 PM
Registered User
 
Join Date: Aug 2004
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

please replace line 33 with following
objRS1.Open "Room", objConn,1,2

I hope this should solve the issue

Saurabh

Saurabh
 
Old November 9th, 2006, 04:51 AM
Registered User
 
Join Date: Nov 2006
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
%>





Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB.Recordset error lance Wrox Book Feedback 2 February 23rd, 2007 02:37 PM
ADODB.RecordSet -- Error nabeeljohn Classic ASP Professional 10 November 9th, 2006 05:23 AM
ADODB.Recordset (0x800A0BB9) deepa12 BOOK: Beginning ASP 3.0 3 November 9th, 2006 04:43 AM
ADODB.Recordset (0x800A0CB3)Current Recordset does tks_muthu Classic ASP Databases 0 June 16th, 2005 07:22 AM
How to get adodb.record from adodb.recordset John Pennington Pro VB Databases 1 November 20th, 2004 06:17 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.