Server Error in '/' Application.

The given key was not present in the dictionary.

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.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.

Source Error:


Line 24:         cls.da1 = New MySqlDataAdapter(sqlEmp, con)
Line 25:         cls.ds = New DataSet()
Line 26:         cls.da1.Fill(cls.ds)
Line 27:         DropDownList1.DataSource = cls.ds
Line 28:         DropDownList1.DataTextField = "albumnm"

Source File: C:\Inetpub\vhosts\shrishirdisaibabasansthan.com\httpdocs\photogallery.aspx.vb    Line: 26

Stack Trace:


[KeyNotFoundException: The given key was not present in the dictionary.]
   System.Collections.Generic.Dictionary`2.get_Item(TKey key) +12780433
   MySql.Data.MySqlClient.CharSetMap.GetCharacterSet(DBVersion version, String CharSetName) +38
   MySql.Data.MySqlClient.NativeDriver.GetFieldMetaData41() +672
   MySql.Data.MySqlClient.NativeDriver.GetFieldMetaData() +56
   MySql.Data.MySqlClient.NativeDriver.ReadColumnMetadata(Int32 count) +39
   MySql.Data.MySqlClient.MySqlDataReader.NextResult() +272
   MySql.Data.MySqlClient.MySqlCommand.ExecuteReader(CommandBehavior behavior) +815
   MySql.Data.MySqlClient.MySqlCommand.ExecuteDbDataReader(CommandBehavior behavior) +4
   System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader(CommandBehavior behavior) +12
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +139
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +136
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +88
   photogallery.albumnm_bind() in C:\Inetpub\vhosts\shrishirdisaibabasansthan.com\httpdocs\photogallery.aspx.vb:26
   photogallery.Page_Load(Object sender, EventArgs e) in C:\Inetpub\vhosts\shrishirdisaibabasansthan.com\httpdocs\photogallery.aspx.vb:37
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.7.3930.0