Server Error in '/BlogEngine.Web' Application.

Topics: ASP.NET 2.0
Dec 4, 2009 at 2:47 AM

Please let me know if you have any solutions.

Server Error in '/BlogEngine.Web' Application.

Column 'ExtensionType' cannot be null

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: MySql.Data.MySqlClient.MySqlException: Column 'ExtensionType' cannot be null

Source Error:

Line 1364:                    cmd.Parameters.Add(dpFile);
Line 1365:
Line 1366:                    cmd.ExecuteNonQuery();
Line 1367:                }
Line 1368:            }


Source File: C:\BACKUPS\Social Network - phpbb3\BlogEngine.NET 1.5 (source)\BlogEngine.Core\Providers\DbBlogProvider.cs    Line: 1366

Stack Trace:

[MySqlException (0x80004005): Column 'ExtensionType' cannot be null]
   MySql.Data.MySqlClient.MySqlStream.OpenPacket() +289
   MySql.Data.MySqlClient.NativeDriver.ReadResult(UInt64& affectedRows, Int64& lastInsertId) +97
   MySql.Data.MySqlClient.MySqlDataReader.GetResultSet() +87
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +961
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +1620
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader() +32
   MySql.Data.MySqlClient.MySqlCommand.ExecuteNonQuery() +69
   BlogEngine.Core.Providers.DbBlogProvider.SaveToDataStore(ExtensionType exType, String exId, Object settings) in C:\BACKUPS\Social Network - phpbb3\BlogEngine.NET 1.5 (source)\BlogEngine.Core\Providers\DbBlogProvider.cs:1366
   BlogEngine.Core.Providers.BlogService.SaveToDataStore(ExtensionType exType, String exId, Object settings) in C:\BACKUPS\Social Network - phpbb3\BlogEngine.NET 1.5 (source)\BlogEngine.Core\Providers\BlogService.cs:368
   BlogEngine.Core.DataStore.ExtensionSettingsBehavior.SaveSettings(ExtensionType exType, String exId, Object settings) in C:\BACKUPS\Social Network - phpbb3\BlogEngine.NET 1.5 (source)\BlogEngine.Core\DataStore\ExtensionSettingsBehavior.cs:39
   BlogEngine.Core.DataStore.SettingsBase.SaveSettings(Object settings) in C:\BACKUPS\Social Network - phpbb3\BlogEngine.NET 1.5 (source)\BlogEngine.Core\DataStore\SettingsBase.cs:55
   ExtensionManager.SaveToStorage(ManagedExtension ext) in c:\BACKUPS\Social Network - phpbb3\BlogEngine.NET 1.5 (source)\BlogEngine.Web\App_Code\ExtensionManager\Manager.cs:393
   ExtensionManager.LoadExtensions() in c:\BACKUPS\Social Network - phpbb3\BlogEngine.NET 1.5 (source)\BlogEngine.Web\App_Code\ExtensionManager\Manager.cs:190
   ExtensionManager.ExtensionEnabled(String extensionName) in c:\BACKUPS\Social Network - phpbb3\BlogEngine.NET 1.5 (source)\BlogEngine.Web\App_Code\ExtensionManager\Manager.cs:57
   ASP.global_asax.Application_Start(Object sender, EventArgs e) in c:\BACKUPS\Social Network - phpbb3\BlogEngine.NET 1.5 (source)\BlogEngine.Web\Global.asax:55



Version Information: Microsoft .NET Framework Version:2.0.50727.3603; ASP.NET Version:2.0.50727.3082

Nov 26, 2012 at 3:04 PM

Hi,

I know its too late for reply, but it might help others. I had the same issue and found solution at Oracle forum.

Try to Bind all of the parameters as follows:

dbCmd.Parameters.Add("?sid", MySqlDbType.Int32);
dbCmd.Parameters.Add("?messageDT", MySqlDbType.DateTime);
dbCmd.Parameters.Add("?messageType", MySqlDbType.VarChar);

worked for me.

Thanks