Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2004
    Posts
    2

    Unanswered: "Arguments are of the wrong type, are out of acceptable range...etc"

    I'm relatively new to ASP work, I've been teaching myself from scratch for about 2 days now, and I've been able to do a lot of work with databses because of it, but now I am working on a web-interface to add in the data through forms instead of offline then uploading a very large DB to my server every few days.

    However, when I submit my data, every time this error occurs:

    "ADODB.Recordset error '800a0bb9'

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

    /addrelease.asp, line 41"
    ------
    These are lines 39-41:

    Line 39: strSQLQuery = "INSERT INTO games (strName, strLink, intSize, strGenre) VALUES (" & strGameName & ", " & strGameLink & ", " & intGameSize & ", " & strGameGenre & ")"

    Line 40: Set rs = Server.CreateObject("ADODB.Recordset")

    Line 41: rs.Open strSQLQuery, conn, 3, 3



    I was basically copying another script I had found, and I thought all would be well. I converted intGameSize to a long int earlier in the code, so it fits the format used in the database. For a while I thought it might be because I sent "intGameSize" with ' at the beginning and end, but that was obviously wrong (used to working with C code, so it was worth a shot).



    Can anybody give me a suggestion to what I'm doing wrong? I've tried having the code spit out exactly what is being sent, and this is the exact value of strSQLQuery:

    INSERT INTO games (strName, strLink, intSize, strGenre) VALUES (Name of Game, edk2://, 5000, Arcade Classic)



    - Hope somebody can help me out,
    Kaiousama

  2. #2
    Join Date
    Apr 2003
    Location
    Evansville, Indiana
    Posts
    76

    Re: "Arguments are of the wrong type, are out of acceptable range...etc"

    Okay...looks like you are just wanting to insert a record into a database, and not return a recordset.

    If you want to insert a record, do something like this:

    strSQL = "INSERT query"

    cn.Open
    cn.Execute strSQL ' here's the key line of code!
    cn.Close
    Set cn = Nothing

    However, if you want to return a recordset, you would do this:

    strSQL = "SELECT query"

    cn.Open
    Set rs = cn.Execute strSQL
    ' use the recordset object named rs to loop and do something...
    rs.close
    cn.close
    Set rs = Nothing
    Set cn = Nothing

    HTH!

    Kael MCSD, A+

  3. #3
    Join Date
    Jun 2003
    Location
    USA
    Posts
    1,032
    Or for a "quick and dirty" generic ASP open source solution to putting databases on the Web that just requires setting up a configuration page for each table or query and uploading the database to the Web as long as there is an autonumber field in each table (and you'll probably also separately want to create login capabilities), perhaps try something like this:
    GenericDB by Eli Robillard
    http://www.genericdb.com and then click on the Tips link to see an example
    J. Paul Schmidt, Freelance Web and Database Developer
    www.Bullschmidt.com
    Access Database Sample, Web Database Sample, ASP Design Tips

Posting Permissions

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