MSSQL Update Script Issue

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.
11/18/2007 6:03:49 AM
Gravatar
Total Posts 4

MSSQL Update Script Issue

Hi,

I have downloaded the latest SVN source, built it, created the database, run the schema installation script, and configured the data access as specified.  However, on running the solution for the first time, the setup script fails with the following error:

Welcome to mojoPortal Setup
Probing system...
File system permissions ok.
MSSQL database connection ok.
database permissions are sufficient to alter schema.
database initial schema already exists.
database core schema needs upgrade.
0 site(s) found.
Running script mojoportal-core - 2.2.1.9 - 00:00:04.7968976
System.Data.SqlClient.SqlException: Either the parameter @objname is ambiguous or the claimed @objtype (COLUMN) is wrong. at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async) at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) at System.Data.SqlClient.SqlCommand.ExecuteNonQuery() at mojoPortal.Data.SqlHelper.ExecuteNonQuery(SqlTransaction transaction, CommandType commandType, String commandText, SqlParameter[] commandParameters) in E:\Documents and Settings\Andy\My Documents\Visual Studio 2005\Projects\MojoPortal\mojoPortal.Data.MSSQL\SQLHelper.cs:line 448 at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(String script, String overrideConnectionInfo) in E:\Documents and Settings\Andy\My Documents\Visual Studio 2005\Projects\MojoPortal\mojoPortal.Data.MSSQL\dbPortal.cs:line 516 at mojoPortal.Data.DBPortal.DatabaseHelperRunScript(FileInfo scriptFile, String overrideConnectionInfo) in E:\Documents and Settings\Andy\My Documents\Visual Studio 2005\Projects\MojoPortal\mojoPortal.Data.MSSQL\dbPortal.cs:line 452 at mojoPortal.Business.DatabaseHelper.RunScript(Guid applicationId, FileInfo scriptFile, String overrideConnectionInfo) in E:\Documents and Settings\Andy\My Documents\Visual Studio 2005\Projects\MojoPortal\mojoPortal.Business\DatabaseHelper.cs:line 312 - 00:00:05.4077760
 

Can you please advise on any steps I should take to rectify this error?

Many thanks,

Andy.

 

11/18/2007 6:15:03 AM
Gravatar
Total Posts 18439

Re: MSSQL Update Script Issue

Hi Andy,

What do you mean you ran the schema creation script? You should only create the db and set the connection string and the setup will run all scripts. Maybe by running something manually that was not supposed to be run its in an inconsistent state. I would start again with a clean db and don't run any scripts manually.

Hope it helps,

Joe

11/20/2007 3:58:29 PM
Gravatar
Total Posts 4

Re: MSSQL Update Script Issue

Hi Joe,

I followed your advice, and started with a clean DB, and also got the latest source from the SVN repository.  On running the Core solution, I got the expected exceptions on the first time debug.  However, these errors never seemed to progress, and the application constantly fell over at the same line of code (line 2513, mojoPortal.Data.SqlHelperParameterCache class).  The exception has so far been raised 14 times at this one point, with no sign of tables or stored procedures being generated in the targeted database.  The error page being generated is:

Server Error in '/' Application.
The stored procedure 'mp_Sites_SelectAll' doesn't exist.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.InvalidOperationException: The stored procedure 'mp_Sites_SelectAll' doesn't exist.

Source Error:

Line 2511:
Line 2512: connection.Open();
Line 2513: SqlCommandBuilder.DeriveParameters(cmd);
Line 2514: connection.Close();
Line 2515:


Source File: E:\Documents and Settings\Andy\My Documents\Visual Studio 2005\Projects\MojoPortal\mojoPortal.Data.MSSQL\SQLHelper.cs Line: 2513

Stack Trace:

[InvalidOperationException: The stored procedure 'mp_Sites_SelectAll' doesn't exist.]
System.Data.SqlClient.SqlCommand.DeriveParameters() +883612
System.Data.SqlClient.SqlCommandBuilder.DeriveParameters(SqlCommand command) +88
mojoPortal.Data.SqlHelperParameterCache.DiscoverSPParameterSet(SqlConnection connection, String spName, Boolean includeReturnValueParameter) in E:\Documents and Settings\Andy\My Documents\Visual Studio 2005\Projects\MojoPortal\mojoPortal.Data.MSSQL\SQLHelper.cs:2513
mojoPortal.Data.SqlHelperParameterCache.GetSPParameterSetInternal(SqlConnection connection, String spName, Boolean includeReturnValueParameter) in E:\Documents and Settings\Andy\My Documents\Visual Studio 2005\Projects\MojoPortal\mojoPortal.Data.MSSQL\SQLHelper.cs:2685
mojoPortal.Data.SqlHelperParameterCache.GetSPParameterSet(String connectionString, String spName, Boolean includeReturnValueParameter) in E:\Documents and Settings\Andy\My Documents\Visual Studio 2005\Projects\MojoPortal\mojoPortal.Data.MSSQL\SQLHelper.cs:2629
mojoPortal.Data.SqlHelperParameterCache.GetSPParameterSet(String connectionString, String spName) in E:\Documents and Settings\Andy\My Documents\Visual Studio 2005\Projects\MojoPortal\mojoPortal.Data.MSSQL\SQLHelper.cs:2609
mojoPortal.Data.SqlParameterHelper.InitializeArray() in E:\Documents and Settings\Andy\My Documents\Visual Studio 2005\Projects\MojoPortal\mojoPortal.Data.MSSQL\SQLParameterHelper.cs:60
mojoPortal.Data.SqlParameterHelper.BeginDefineSqlParameters() in E:\Documents and Settings\Andy\My Documents\Visual Studio 2005\Projects\MojoPortal\mojoPortal.Data.MSSQL\SQLParameterHelper.cs:50
mojoPortal.Data.SqlParameterHelper.Initialize(String pConnectionInfo, String pCommandText, CommandType pCmdType, Int32 pParamCnt) in E:\Documents and Settings\Andy\My Documents\Visual Studio 2005\Projects\MojoPortal\mojoPortal.Data.MSSQL\SQLParameterHelper.cs:83
mojoPortal.Data.SqlParameterHelper..ctor(String connectionString, String commandText, Int32 paramCnt) in E:\Documents and Settings\Andy\My Documents\Visual Studio 2005\Projects\MojoPortal\mojoPortal.Data.MSSQL\SQLParameterHelper.cs:42
mojoPortal.Data.DBSiteSettings.GetSiteList() in E:\Documents and Settings\Andy\My Documents\Visual Studio 2005\Projects\MojoPortal\mojoPortal.Data.MSSQL\dbSiteSettings.cs:262
mojoPortal.Business.SiteSettings.SiteCount() in E:\Documents and Settings\Andy\My Documents\Visual Studio 2005\Projects\MojoPortal\mojoPortal.Business\SiteSettings.cs:963
mojoPortal.Business.DatabaseHelper.ExistingSiteCount() in E:\Documents and Settings\Andy\My Documents\Visual Studio 2005\Projects\MojoPortal\mojoPortal.Business\DatabaseHelper.cs:287
mojoPortal.Web.mojoBasePage.OnError(EventArgs e) in E:\Documents and Settings\Andy\My Documents\Visual Studio 2005\Projects\MojoPortal\Web\Components\mojoBasePage.cs:403
System.Web.UI.Page.HandleError(Exception e) +73
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +6969
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +213
System.Web.UI.Page.ProcessRequest() +86
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +18
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.default_aspx.ProcessRequest(HttpContext context) in e:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ff5f33b7\bf85c1fb\App_Web_bqtuuehq.4.cs:0
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +303
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64

[Exception: Unhandled Exception while processing NeatUpload child request]
Brettle.Web.NeatUpload.UploadHttpModule.Application_BeginRequest(Object sender, EventArgs e) +1424
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +92
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +64
 

 

The Visual Studio debug output is:

'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_32\mscorlib\2.0.0.0__b77a5c561934e089\mscorlib.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\WebDev.WebServer.exe', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_32\WebDev.WebHost\8.0.0.0__b03f5f7f11d50a3a\WebDev.WebHost.dll', No symbols loaded.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_MSIL\System.Windows.Forms\2.0.0.0__b77a5c561934e089\System.Windows.Forms.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_MSIL\System\2.0.0.0__b77a5c561934e089\System.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_MSIL\System.Drawing\2.0.0.0__b03f5f7f11d50a3a\System.Drawing.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_32\System.Web\2.0.0.0__b03f5f7f11d50a3a\System.Web.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_MSIL\System.Xml\2.0.0.0__b77a5c561934e089\System.Xml.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_MSIL\System.Design\2.0.0.0__b03f5f7f11d50a3a\System.Design.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_MSIL\System.Web.RegularExpressions\2.0.0.0__b03f5f7f11d50a3a\System.Web.RegularExpressions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
The thread '<No Name>' (0xc48) has exited with code 0 (0x0).
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_MSIL\Microsoft.JScript\8.0.0.0__b03f5f7f11d50a3a\Microsoft.JScript.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_32\VJSharpCodeProvider\2.0.0.0__b03f5f7f11d50a3a\VJSharpCodeProvider.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_MSIL\CppCodeProvider\8.0.0.0__b03f5f7f11d50a3a\CppCodeProvider.dll', No symbols loaded.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ff5f33b7\bf85c1fb\App_GlobalResources.ljsgm-qp.dll', Symbols loaded.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ff5f33b7\bf85c1fb\App_global.asax.2-mf4qws.dll', Symbols loaded.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualBasic\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ff5f33b7\bf85c1fb\assembly\dl3\b1720c09\a0f56683_bb2bc801\mojoPortal.Web.DLL', Symbols loaded.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ff5f33b7\bf85c1fb\App_Browsers.-vu6zje2.dll', Symbols loaded.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ff5f33b7\bf85c1fb\assembly\dl3\99c07f17\d0c4cfc3_d227c801\log4net.DLL', No symbols loaded.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_MSIL\System.Web.Mobile\2.0.0.0__b03f5f7f11d50a3a\System.Web.Mobile.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_MSIL\System.ServiceModel\3.0.0.0__b77a5c561934e089\System.ServiceModel.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_MSIL\SMDiagnostics\3.0.0.0__b77a5c561934e089\SMDiagnostics.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ff5f33b7\bf85c1fb\assembly\dl3\48e73357\8012c5c3_d227c801\Brettle.Web.NeatUpload.DLL', No symbols loaded.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_MSIL\System.Web.Extensions\1.0.61025.0__31bf3856ad364e35\System.Web.Extensions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ff5f33b7\bf85c1fb\assembly\dl3\3f8dbc1e\e07b34a3_6129c801\mojoPortal.Business.DLL', Symbols loaded.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ff5f33b7\bf85c1fb\assembly\dl3\fb326070\b061bb7b_bb2bc801\mojoPortal.Web.Framework.DLL', Symbols loaded.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ff5f33b7\bf85c1fb\assembly\dl3\a5bf9d74\d02f647d_bb2bc801\mojoPortal.Business.WebHelpers.DLL', Symbols loaded.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_32\System.Data\2.0.0.0__b77a5c561934e089\System.Data.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ff5f33b7\bf85c1fb\assembly\dl3\b64b4a9b\7043b4c3_d227c801\Subkismet.DLL', Symbols loaded.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ff5f33b7\bf85c1fb\App_Web_bqtuuehq.dll', Symbols loaded.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ff5f33b7\bf85c1fb\assembly\dl3\ee07ff6b\d0b116b3_6129c801\mojoPortal.Web.Controls.DLL', Symbols loaded.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ff5f33b7\bf85c1fb\assembly\dl3\5c635481\50e1afab_6129c801\mojoPortal.Web.Editor.DLL', Symbols loaded.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ff5f33b7\bf85c1fb\assembly\dl3\7fa0a487\20433cc4_d227c801\Microsoft.Web.Preview.DLL', No symbols loaded.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_32\System.Transactions\2.0.0.0__b77a5c561934e089\System.Transactions.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\assembly\GAC_32\System.EnterpriseServices\2.0.0.0__b03f5f7f11d50a3a\System.EnterpriseServices.dll', Skipped loading symbols. Module is optimized and the debugger option 'Just My Code' is enabled.
'WebDev.WebServer.EXE' (Managed): Loaded 'E:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\Temporary ASP.NET Files\root\ff5f33b7\bf85c1fb\assembly\dl3\18784793\2097e3a0_6129c801\mojoPortal.Data.DLL', Symbols loaded.
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
The thread 0x16a8 has exited with code 0 (0x0).
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
The thread '<No Name>' (0x1684) has exited with code 0 (0x0).
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
A first chance exception of type 'System.InvalidOperationException' occurred in System.Data.dll
 

It was this error being raised on the initial debug that led me to run the database scripts manually as described previously.  Can you help me resolve this error?

Thanks,

Andy.

11/21/2007 6:57:21 AM
Gravatar
Total Posts 18439

Re: MSSQL Update Script Issue

Hi Andi,

Sorry it seems I introduced a bug in setup while cleaning up some FxCop violations. I'm fixing this now and will have the fix in svn trunk in a few hours. I'll post again when its ready and then you can do svn update to get the code.

Best,

Joe

11/21/2007 8:54:58 AM
Gravatar
Total Posts 18439

Re: MSSQL Update Script Issue

Hi Andi,

If you right click the top folder and do svn update it will pull down the new code and then it will work with no problems.

Sorry for the bumpy experience so far.

Best,

Joe

11/21/2007 2:46:12 PM
Gravatar
Total Posts 4

Re: MSSQL Update Script Issue

Hi Joe,

Just to confirm that I was able to successfully install MojoPortal after updating the source code.  Thanks for all you help with these issues.

Regards,

Andy.

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