Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Arguments are of the wrong type, are out of acceptable range, or are in conflict with

    Hi All,


    I get the error :
    Code:
    ADODB.Recordset error '800a0bb9' 
    
    Arguments are of the wrong type, are out of acceptable range, or are in conflict with one another. 
    
    /shipslip.asp, line 15
    when executing a script I am running.

    The file is as follows:
    Code:
    shipslip.asp
    
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <!--#include file="Connections/packslip.asp" -->
    <%
    Dim Recordset1__MMColParam
    Recordset1__MMColParam = "1"
    If (Request.QueryString("id") <> "") Then 
      Recordset1__MMColParam = Request.QueryString("id")
    End If
    %>
    <%
    Dim Recordset1
    Dim Recordset1_numRows
    
    Set Recordset1 = Server.CreateObject("ADODB.Recordset")
    Recordset1.ActiveConnection = MM_packslip_STRING
    Recordset1.Source = "SELECT * FROM orders WHERE orderid = " + Replace(Recordset1__MMColParam, "'", "''") + ""
    'Recordset1.Source = "SELECT * FROM orders WHERE orderid = '2'"
    Recordset1.CursorType = 2
    Recordset1.CursorLocation = 2
    Recordset1.LockType = 3
    Recordset1.Open()
    
    Recordset1_numRows = 0
    %>
    The included file, Connections\packslip.asp is as follows:

    Code:
    <%
    ' FileName="Connection_odbc_conn_dsn.htm"
    ' Type="ADO" 
    ' DesigntimeType="ADO"
    ' HTTP="false"
    ' Catalog=""
    ' Schema=""
    
    Dim MM_packslip_STRING
    MM_invoice_STRING = "DRIVER={MySQL}; SERVER=#####; DATABASE=temple; User=#####;PASSWORD=#####; OPTION=3;"
    %>

    Can anybody offer any assistance with this error?
    Thanks in advance,

    Jon

  • #2
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,124
    Thanks
    75
    Thanked 4,338 Times in 4,304 Posts
    Ummm...

    Code:
    MM_invoice_STRING = "DRIVER={MySQL}; SERVER=#####; DATA...."
    but then
    Code:
    Recordset1.ActiveConnection = MM_packslip_STRING
    If you care, that code generated by Dumb and Worthless (a.k.a. the seriously misnamed "DreamWeaver") is about 5 times more complex than needed.
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • Users who have thanked Old Pedant for this post:

    JonRTW (09-27-2012)

  • #3
    Supreme Master coder! Old Pedant's Avatar
    Join Date
    Feb 2009
    Posts
    25,124
    Thanks
    75
    Thanked 4,338 Times in 4,304 Posts
    Oh, heck. I can't stand it.
    Code:
    <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
    <%
    Set conn = Server.CreateObject("ADODB.Connection")
    conn.Open "DRIVER={MySQL}; SERVER=#####; DATABASE=temple; User=#####;PASSWORD=#####; OPTION=3;"
    
    id = 0
    On Error Resume Next
       id = CLNG( Request("id") )
    On Error GoTo 0
    
    SQL = "SELECT * FROM orders WHERE orderid = " & id
    Set Recordset1 = conn.Execute( SQL )
    If Recordset1.EOF Then
         conn.Close
         Response.Write "Invalid id passed from previous page."
         Response.End
    End If
    
    ... now work with the recordset ...
    %>
    An optimist sees the glass as half full.
    A pessimist sees the glass as half empty.
    A realist drinks it no matter how much there is.

  • #4
    New to the CF scene
    Join Date
    Sep 2012
    Posts
    2
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Hi,

    Many thanks for the reply. I must confess ASP isn't something I am too familiar with. I am more of a PHP person myself, but got asked to look at this problem by a friend. I'll try the change as you mentioned.


    Edit:
    Fixed it! Many many thanks
    Last edited by JonRTW; 09-27-2012 at 04:09 PM. Reason: Fixed!!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •