steve514
Posts: 14
|
| Posted: 05/04/2007, 7:46 AM |
|
Hello,
I get the following:
ADODB.Recordset error '800a0e78'
Operation is not allowed when the object is closed.
/Public/Dsf/Classes.asp, line 3308
-----------------------------------------------------------------------
I only get this message on pages that have two tables. All of my tables are setup the same on every page, and any page that has only one table works fine. Any page that has more than one table throws the error above. I have no idea why this is happening. Any clues would be greatly appreciated...
Thanks in advance!
|
 |
 |
JimmyCrackedCorn
Posts: 583
|
| Posted: 05/04/2007, 2:52 PM |
|
I was getting the same error message (plus others) and solved it by giving all of my fields unique names, ie. even if a field was in a different table I gave it a unique name. Don't know if this would help you but it would be simple enough to try.
_________________
Walter Kempees...you are dearly missed. |
 |
 |
steve514
Posts: 14
|
| Posted: 05/09/2007, 6:35 AM |
|
I did what "JimmyCrackedCorn" said and it made no difference. I am still have the same problem as above and don't know why? It works on the local host fine, but fails on the server. Any help would be greatly apreciated??????
Thanks in advance!
|
 |
 |
Benjamin Krajmalnik
|
| Posted: 05/09/2007, 8:17 AM |
|
There are a few things which you must providwe in order for us to be able to
help.
Go to your line 3308 in your Classes.asp.
Which function does this belong to?
Once you know, you can start tracing from there.
The actual line may even indicate where the problem is.
You may want to delete the common files and have CodeCharge regenerate them.
I haev screens with 10 tables and tens of fields, each getting aggregate
data via complex SQL queries, and have had no problem.
|
|
|
 |
steve514
Posts: 14
|
| Posted: 05/09/2007, 8:45 AM |
|
Hello,
The class is the following:
'clsCommand Class @0-2AA6FEA6
Class clsCommand
---------------------------------------------------------------------------------------------
The function is the following in the above class of classes.asp:
Select Case CommandType
Case dsTable, dsSQL
CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeBuildSelect", Me)
If InStr(SQL, "{SQL_Where}") > 0 Or InStr(SQL,"{SQL_OrderBy}") > 0 Then
SQL = Replace(SQL, "{SQL_Where}", IIf(Len(Where) > 0, " WHERE " & Where, ""))
If InStr(SQL,"{SQL_OrderBy}") > 0 Then
SQL = Replace(SQL, "{SQL_OrderBy}", IIf(Len(OrderBy) > 0, " ORDER BY " & OrderBy, ""))
Else
SQL = SQL & IIf(Len(OrderBy) > 0, " ORDER BY " & OrderBy, "")
End If
builtSQL = ParseParams(SQL, WhereParameters)
Else
builtSQL = ParseParams(SQL & IIf(Len(Where) > 0, " WHERE " & Where, "") & IIf(Len(OrderBy) > 0, " ORDER BY " & OrderBy, ""), WhereParameters)
End If
CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeExecuteSelect", Me)
Set DataSource.Recordset = OpenRecordset(builtSQL,False)
If ActivePage > 0 And IsNeedMoveToPage Then
DataSource.MoveToPage ActivePage
End If
If Not IsEmpty(mCountSQL) And Len(CountSQL) = 0 And NOT DataSource.Recordset.EOF Then
If DataSource.Recordset.State = adStateOpen Then
Dim Counter : Counter = 0
While NOT DataSource.Recordset.EOF AND Counter < mPageSize+1
Counter = Counter + 1
DataSource.Recordset.MoveNext
Wend
DataSource.RecordCount = IIF(ActivePage>0,(ActivePage - 1) * mPageSize, 0) + Counter
End If
If ActivePage > 0 Then
DataSource.Recordset.MoveFirst
DataSource.MoveToPage ActivePage
End If
End If
-------------------------------------------------------------------------------------
The error line that it keeps throwing an error on is the part that states:
If Not IsEmpty(mCountSQL) And Len(CountSQL) = 0 And NOT DataSource.Recordset.EOF Then
-------------------------------------------------------------------------------
I have no idea at all to why this is happening??? Please respond and let me know what you think. Again, any help is greatly appreciated.
Thank you.
|
 |
 |
BradHurst
Posts: 1
|
| Posted: 05/09/2007, 12:25 PM |
|
Steve,
Somewhere in your page you have a count of records displayed.
Try removing the count display label and this should fix your error.
You can then selectively place it back in and trouble shoot it that way.
Hope this helps.
Brad
|
 |
 |
mhope
Posts: 37
|
| Posted: 05/09/2007, 3:19 PM |
|
This error message normally happens when there are errors in the sql (custom sql, not codecharge).
Response.write your sql check for errors.
|
 |
 |
steve514
Posts: 14
|
| Posted: 05/10/2007, 6:54 AM |
|
Hello,
I tried the two ideas given above and both didn't work. I removed the counter and I have no custom SQL on this page. I did make some progress though. I have two tables as part of this form page. The first part of the form writes to table A and the second part of the form writes to table B. Table A works fine when I remove table B. I think the connection is being closed and throwing an error when table B is on the page.
I am not sure what to do now??? Any advice would be greatly appreciated.
I have other pages with two tables on them that load just fine, which makes this even more strange.
Thanks for the help so far!
|
 |
 |
Benjamin Krajmalnik
|
| Posted: 05/10/2007, 8:11 AM |
|
I would open a support ticket with CodeCharge.
As I have said, I have extremely complex pages and no problems.
Without seeing the actual page it is difficult to troubleshoot.
|
|
|
 |
steve514
Posts: 14
|
| Posted: 05/10/2007, 8:16 AM |
|
Hello,
I just wanted to let everyone know I figured it out. It turns out that I needed to specify the database name before my table names in the "data source" field of codecharge. I was selecting the tables and it was listing the table name in the data source, which worked fine for the local host. I needed to switch it <database name>.<table name> for the server.
Thanks again for all your help.
- Steve
|
 |
 |
|