Unable to build the 'Tables' collection because execution of the SQL query failed.

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

Please do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.

This forum is for discussing mojoPortal development

This forum is only for questions or discussions about working with the mojoPortal source code in Visual Studio, obtaining the source code from the repository, developing custom features, etc. If your question is not along these lines this is not the right forum. Please try to post your question in the appropriate forum.

You can monitor commits to the repository from this page. We also recommend developers to subscribe to email notifications in the developer forum as occasionally important things are announced.

Before posting questions here you might want to review the developer documentation.

Do not post questions about design, CSS, or skinning here. Use the Help With Skins Forum for those questions.
This thread is closed to new posts. You must sign in to post in the forums.
3/25/2008 2:00:59 AM
Gravatar
Total Posts 7

Medium Trust error

I am getting Medium Trust error then i search the medium trust error and follow the instruction in mediumtrust page but in cms  mojoportal do content the user.config file .Some times site is good run but adding some changes and refresh the page then i got the following .....i got this error many times then i change only connection string then sites run well...Plz Slove this problem....

File system permissions ok.
MSSQL database connection ok.
database permissions are sufficient to alter schema.

An Error Occurred:Unable to build the 'Tables' collection because execution of the SQL query failed. See the inner exception for details.
Source:System.Data
Stack Trace at System.Data.ProviderBase.DbMetaDataFactory.ExecuteCommand(DataRow requestedCollectionRow, String[] restrictions, DbConnection connection) at System.Data.ProviderBase.DbMetaDataFactory.GetSchema(DbConnection connection, String collectionName, String[] restrictions) at System.Data.ProviderBase.DbConnectionInternal.GetSchema(DbConnectionFactory factory, DbConnectionPoolGroup poolGroup, DbConnection outerConnection, String collectionName, String[] restrictions) at System.Data.SqlClient.SqlConnection.GetSchema(String collectionName, String[] restrictionValues) at mojoPortal.Data.dbPortal.DatabaseHelper_TableExists(String tableName) at mojoPortal.Data.dbPortal.DatabaseHelper_SitesTableExists() at mojoPortal.Business.DatabaseHelper.SchemaHasBeenCreated() at mojoPortal.Web.UI.Pages.SetupHome.ProbeSystem() at mojoPortal.Web.UI.Pages.SetupHome.Page_Load(Object sender, EventArgs e) at System.Web.UI.Control.OnLoad(EventArgs e) at System.Web.UI.Control.LoadRecursive() at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

3/25/2008 7:10:53 AM
Gravatar
Total Posts 18439

Re: Unable to build the 'Tables' collection because execution of the SQL query failed.

Hi,

I don't see anything in this error that indicates its related to Medium Trust. Usually, medium trust issues manifest as security exceptions.

In mojoPortal when errors occur, the global error handling will check if the schema is installed and if it needs an upgrade, if either is true it will redirect to the /Setup/Default.aspx page. The way it determines if the schema has been installed is by checking for the existence of the mp_Sites table.

This error seems to indicate its failing to execute the sql that is checking for the existence of the mp_Sites table. I have never seen this error before, googling it doesn't find much, I see some speculation that the version of SQL server could be a factor.

My best guess is its being caused by an unresponsive db. I think its probably timeout exceptions. In a situation where the db is intermittently unresponsive I could easily understand this error. So maybe, in addition to being hosted in medium trust, you are hosted on a machine that is running at max capacity.

The reason changing the connection string fixes it for a while is because any time you modify the Web.config file it recycles the application, clearing any memory it is using. Then the application starts again and its ok for a while but because (possibly) the machine is maxed out errors start happening again.

Thats the best theory I have for this at the moment.

Hope it helps,

Joe

 

You must sign in to post in the forums. This thread is closed to new posts.