CodeCharge Studio
search Register Login  

Visual Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 Operation not allowed..object is closed - Solution

Print topic Send  topic

Author Message
Hamilton
Posted: 09/04/2003, 4:41 PM

I have noticed - at times - that people had asked why they were getting the "Operation is not allowed when the object is closed" error message from common.asp.

This also appeared to affect PHP developers as well.

Though Yes Support was asked to supply an answer, there were too many variables and 'little' information in the user posts to enable them to hone in on the issue.

But I may have stumbled upon an answer to the issue.

This potential solution refers directly to SQL Server databases but may also affect MS Access databases as well.

I had a SQL Server database with a number of tables.
All was well. No errors were ever experienced.

Over time the number of tables began to grow and I decided that I would place a prefix at the beginning of each table that was related to a given application.

e.g., all 'Library' tables would now begin with the word 'Library_'

Having added the prefixes, and feeling satisfied that I had made the database table nominclature easier to read at a glance, I went to the first 'Library page' and modifed the database table settings - pointing it at the renamed Library_****** table. And regenerated the code.

Immediately upon attempting to login, I received the "Operation is not allowed when the object is closed" Error.

Amazed and somewhat concerned, I thought about what I'd done and the resulting error message from the CCS code.

I renamed the 'Library_' tables to 'L_' thus shorting the table name again and once again reset the form values for what was now my 'test page' pointing it at the renamed L_****** table. (NOTE: I used Security on the pages, e.g., one needs to Login to view the page... this adds a variable to the potential cause and remedy of the 'Operation not allowed..object is closed' issue.)

I regenerated and tried to login.

I logged in without issue.

I changed it back to Library_************ and regenerated.

Again I received the 'Operation not allowed..object is closed' error.

Now with what appeared to be 20/20 vision, I counted the length of the table name that I'd given the 'Library_********' and it's length was over 25 characters.

So, I surmise that Yes Software may have been pedantic about the length of the table name which in SQL Server 7 was about 25 characters (I forget - been using SQL Server 2000 to long) where as for SQL Server it's much longer - over 100 chars...

IF this theory is found to be the case....

Perhaps Yes Software will include a SQL Server 7 and a SQL Server 2000 selection in the 'settings' combo box and include the code to (A) Determine the max table name width based on whether SQL 7 or SQL 2000 and (B) provide an error warning message such as 'Table Name Width Exceeds Maximum Characters' or something to that effect?

Perhaps someone else would be willing to test the theory.
Hamilton
Posted: 09/04/2003, 7:43 PM

I think that the reason may instead been as a result of pointing the 'Settings Page Login Table' to a View that I had created...

The Table name too long may not be what it is at all.

Again, there are many variables.... and I had just renamed the tables and thought that was it, missing the fact that I'd pointed at a view...

I don't see why that's producing the error though, since CCLoginUser(Login, Password) is simply performing a select.

Something for Yes to check out.

Seems to only occur within the CCLoginUser(Login, Password) routine - as I've used views many times for Grids, etc.

Strange.
RonB
Posted: 09/04/2003, 11:48 PM

I checked the php mssql server classes and the common.php file and I cannot find any reference to a maximum number of characters coded in to the class. So if this problem also occurs on php it's not likely to be a CCS problem. It doesn't look like they hadcoded a limit in to the ccs classes.

I must say I have a hard time believing that using a view could be the problem. CCS is not aware of the fact that you are using a view. That's all server side (db server) so I cant imagine how the problem would be caused by CCS and the fact that you are using a view. To ccs doing a select on a view is no different then performing it on a normal table.

I think you are right that it can't be the long table names and even if it is, that would be something for MS to fix not Yes. I do not have any trouble with MySQL and Oracle.

So I guess it's either an ASP problem or a problem in the communictation with the database caused by the database.

Ron

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.