Wrox Programmer Forums
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP 3.0 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 October 22nd, 2004, 04:48 PM
Registered User
Join Date: Oct 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default ADODB.Recordset (0x800A0BB9)

     I am getting this Error

Error Type:
ADODB.Recordset (0x800A0BB9)
Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.
/khandkeOnline/Images/classified/AddUser.asp, line 9

below is my code,I tried all combination of locktype but it gives this error everytime.I can retrive the data easily from the database just can't insert any record. Please help... This is the example from chapter 15.


dim rsUsers
set rsUsers=Server.CreateObject("ADODB.Recordset")
SQL_str="Select * from Person where E_Mail='" & Session("E_Mail") & "' and Pword='" & Session("FormPass") & "'"
rsUsers.Open SQL_str, objConn,adOpenForwardOnly, adLockOptimistic, adCmdTable --> shows Error on this line

if Session("PersonId") <> " " then
  rsUsers.Filter="PersonId= '" & Session("PersonId") & "'"
  rsUsers.Filter="E_Mail= '" & Request.Form("E_Mail") & "'" & "AND Pword= '" & Request.Form("FormPass") & "'"
   if rsUsers.EOF then
    ' Email, Password Matches with DB
    end if
 end if

rsUsers("E_Mail") =Request.Form("E_Mail")


 Option Explicit
 Dim objConn
 set objConn= Server.CreateObject("ADODB.Connection")
 objConn.Open "Provider=Microsoft.Jet.OLEDB.4.0; " & "Data Source=C:\Inetpub\wwwroot\khandkeProj\Images\Class ified\ClassData.mdb"

 if Session("blnValidUser")= True and Session("PersonId") = "" then
  Dim rsPersonIdCheck
  set rsPersonIdCheck=Server.CreateObject("ADODB.Records et")
  Dim strSQL
  strSQL="select PersonId from Person where E_Mail= '" & Session("E_Mail") & "';"
  rsPersonIdCheck.Open strSQL, objConn
  if rsPersonIdCheck.EOF Then
    Session("blnValidUser")= False
    Session("PersonId") =rsPersonIdCheck("PersonId")
  End if
  set rsPersonIdCheck = Nothing
 End if

Old October 24th, 2004, 08:28 AM
Friend of Wrox
Join Date: Jun 2003
Posts: 2,480
Thanks: 0
Thanked 1 Time in 1 Post

Hi Deepa,

Check out this - ADODB.Recordset error '800a0bb9' - Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another.]

Also you shouldn't be using adCmdTable, as you use an SQL statement there to open the recordset. Only when you try to open the entire table using just the table name, without sql statement, you should use that parameter. Else in your case it should be adCmdText

Hope that helps.

- Vijay G
Strive for Perfection
Old October 29th, 2004, 03:07 PM
Registered User
Join Date: Oct 2004
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts

Thanks, My problem is solved, it was a space in # include statement.

Old November 9th, 2006, 04:43 AM
Registered User
Join Date: Nov 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts

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>
      <td><input type="text" name="educ" size="30"></td>
     <tr><td colspan="2" align="center"><input type="submit" name="Submit" value="Add"></td></tr>
     Set rsEduc = Server.CreateObject("ADODB.Recordset")
     educSQL = "select * from educations"
     rsEduc.Open educSQL, adoCon, 2, 3
     rsEduc.Fields("exp_id") = Request.QueryString("id")
     rsEduc.Fields("education") = Request.Form("educ")
     'Response.Write("Add Something")
     'display the Education when there is a record found in the database
  End If

watashi no namai wa hanako desu

Similar Threads
Thread Thread Starter Forum Replies Last Post
ADODB.Recordset (0x800A0BB9) knight Classic ASP Databases 3 November 9th, 2006 05:08 AM
Error in ADODB.Recordset (0x800A0BB9) rylemer Classic ASP Databases 3 November 9th, 2006 05:06 AM
Recordset (0x800A0BB9) - ERROR myself Classic ASP Professional 1 August 17th, 2006 12:30 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.