.NET and Mysql 3.22

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • randome
    New Member
    • Jan 2008
    • 6

    .NET and Mysql 3.22

    Hello everyone,
    so far I've been using Mysql connector with my C# code, to connect and work with data on a mysql server.
    It is great for server's with version 3.22+
    Now I've got to work with a mysql server 3.22 and guess what...I've got problems connecting to the server.
    So I'm guessing the problem is in the server version.
    My question goes : Did any of you used C# and Mysql 3.22 for database server? How/What did you use to connect to the database?

    Any help appreciated.
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    Have you followed the correct connectionstrin g pattern?
    404 - Page Not Found. Shown when a URL cannot be mapped to any kind of resource.

    Comment

    • randome
      New Member
      • Jan 2008
      • 6

      #3
      Yes of course.
      I've forgot to mention. That this is a desktop application.
      And the code is the same (works on mysql 3.22+ version)

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        What are the actual errors you are seeing?
        You said it is connecting related. Have you set up all your permissions on this different server? Are all the database names/tables the same? Do the user credentials exist?

        Comment

        • randome
          New Member
          • Jan 2008
          • 6

          #5
          Originally posted by Plater
          What are the actual errors you are seeing?
          You said it is connecting related. Have you set up all your permissions on this different server? Are all the database names/tables the same? Do the user credentials exist?
          It happens at MysqlConnection .Open() command.
          This is the error:

          Code:
          System.Collections.Generic.KeyNotFoundException was unhandled
            Message="The given key was not present in the dictionary."
            Source="mscorlib"
            StackTrace:
                 at System.ThrowHelper.	()
                 at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
                 at MySql.Data.MySqlClient.CharSetMap.GetChararcterSet(DBVersion version, String CharSetName)
                 at MySql.Data.MySqlClient.CharSetMap.GetEncoding(DBVersion version, String CharSetName)
                 at MySql.Data.MySqlClient.Driver.Configure(MySqlConnection conn)
                 at MySql.Data.MySqlClient.NativeDriver.Configure(MySqlConnection connection)
                 at MySql.Data.MySqlClient.MySqlConnection.Open()
                 at MyProgram.MyDatabaseConnection.ExecuteNonQuery(String query, MySqlConnection MyConnection) in C:\MyDatabaseConnection.cs:line 145
                 at MyProgram.MyDatabaseConnection._remoteQuery() in C:\MyDatabaseConnection.cs:line 121
                 at MyProgram.MyProgramForm._startMyProgram() in C:\program.cs:line 187
                 at MyProgram.MyProgramForm.IntervalTimer_Tick(Object sender, EventArgs e) in C:\MyProgram.cs:line 256
                 at System.Windows.Forms.Timer.OnTick(EventArgs e)
                 at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
                 at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
                 at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
                 at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
                 at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
                 at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
                 at System.Windows.Forms.Application.Run(Form mainForm)
                 at MyProgram.Program.Main() in C:\Program.cs:line 18
                 at System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)
                 at System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)
                 at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
                 at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
                 at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
                 at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
                 at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
                 at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
                 at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
                 at System.Threading.ThreadHelper.ThreadStart()
            InnerException:

          Comment

          • Plater
            Recognized Expert Expert
            • Apr 2007
            • 7872

            #6
            Looks like it is trying to find the "version" field in your connection string. Either that or there IS a version field and it's complaining about it being there.

            Comment

            Working...