If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ASP > sql insert problem and "object is closed"

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 09-17-04, 23:04
gilgalbiblewhee gilgalbiblewhee is offline
Registered User
 
Join Date: Jul 2004
Posts: 494
sql insert problem and "object is closed"

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

Quote:
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:

Quote:
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.
Reply With Quote
  #2 (permalink)  
Old 09-18-04, 01:02
Seppuku Seppuku is offline
Useless...
 
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.
Reply With Quote
  #3 (permalink)  
Old 09-19-04, 14:21
gilgalbiblewhee gilgalbiblewhee is offline
Registered User
 
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.

Quote:
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
File Type: txt kjvresp.txt (9.5 KB, 35 views)
Reply With Quote
  #4 (permalink)  
Old 09-19-04, 21:22
sundialsvcs sundialsvcs is offline
Registered User
 
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
Reply With Quote
  #5 (permalink)  
Old 09-20-04, 10:13
gilgalbiblewhee gilgalbiblewhee is offline
Registered User
 
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
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On