Results 1 to 5 of 5
  1. #1
    Join Date
    Jul 2004
    Posts
    494

    Unanswered: sql insert problem and "object is closed"

    On my first attempt to run the query I get this:

    INSERT INTO results SELECT * FROM bible WHERE text_data LIKE '%ezra%' AND text_data LIKE '%%' AND text_data LIKE '%%'
    ADODB.Recordset error '800a0e78'

    Operation is not allowed when the object is closed.

    /kjvresp.asp, line 277
    277 is
    Code:
    If Not RS.Eof Then

    On my second run I get:

    INSERT INTO results SELECT * FROM bible WHERE text_data LIKE '%ezra%' AND text_data LIKE '%%' AND text_data LIKE '%%'
    Microsoft OLE DB Provider for ODBC Drivers error '80040e14'

    [Microsoft][ODBC Microsoft Access Driver] The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again.

    /kjvresp.asp, line 272
    The insertion was found in the table but the output to the ASP page is somehow blocked.

  2. #2
    Join Date
    Jul 2003
    Location
    SoCal
    Posts
    721
    There are no results returned from an INSERT statement, therefore, no recordset is returned.
    That which does not kill me postpones the inevitable.

  3. #3
    Join Date
    Jul 2004
    Posts
    494

    where do I go wrong?

    I tried closing the first connection and then reopen so that I can view the "results" table. But it doesn't work entirely.

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

    /kjvresp.asp, line 298
    Attached Files Attached Files

  4. #4
    Join Date
    Oct 2003
    Posts
    706
    S-T-O-P. Quit futzing with it trying to make it work. Figure out why it isn't working. Until then, you can only make it worse as you thrash about. Look up Microsoft's description of the message(s) and examine your code trying to see what it means.

    An INSERT query does not have a recordset. Now, if you had executed the statement necessary to "open" that recordset, I presume that you would have gotten a message to that effect ... but apparently the computer didn't make it to that statement. It ran into a recordset-object that, while initialized in some way, had not been opened.

    So you're looking at a logic-error in your code. As I said, thrashing-it is only gonna make it worse. Print it out, sit down at a bookstore with a nice cuppa cappucino, and read what you have right now carefully.

    (Bear in mind also that I am not trying to be snide. If you would take offense, rest assured that none was intended.)
    ChimneySweep(R): fast, automatic
    table repair at a click of the
    mouse! http://www.sundialservices.com

  5. #5
    Join Date
    Jul 2004
    Posts
    494

    Before you had answered I tried this, and it works but...

    WHen I tested my asp page on the web things worked out except that the results page is giving the table awkwardly. And the results are repeated twice. Example:
    http://n.1asphost.com/wheelofgod/kjv...s&optAction=on

Posting Permissions

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