BUG: MySql Parameters

4 posts, 0 answers
  1. Smail
    Smail avatar
    10 posts
    Member since:
    Apr 2013

    Posted 27 Jan 2014 Link to this post

    Hey guys we've been using OpenAccess free edition for some months now and we're very happy with it. Recently however we've started encountering a bug with the MySQL implementation, specifically when using the DbContext.ExecuteQuery(sql, parameters) see stack below. The problem seems to be with the way you are adding parameters to the MySqlCommand object.

    We are using MySQL Connector v6.8.3, OpenAccess 2013.3 1014 (OCT. 16 2013), has this issue been reported by someone else or if its been fixed is it in the latest version from DEC. 16?

    Only MySqlParameter objects may be stored.
       at MySql.Data.MySqlClient.MySqlParameterCollection.Add(Object value)
       at Telerik.OpenAccess.Data.Common.OAParameterCollection.AddToStoreCollection(OAParameter temp)
       at Telerik.OpenAccess.Data.Common.OAParameterCollection.AddRange(Array values)
       at Telerik.OpenAccess.OpenAccessContextBase.ExecuteQuery[T](String commandText, CommandType commandType, DbParameter[] parameters)
       at Telerik.OpenAccess.OpenAccessContextBase.ExecuteQuery[T](String commandText, DbParameter[] parameters)
       at Deva_Maria.ModuleAG.Domain.AgDosieService.F_GetItems(UInt32 patientID) in d:\DEV\Joystick\Deva_Maria\ModuleAG\Domain\AgDosieService.cs:line 32
       at Deva_Maria.ModuleAG.Presentation.XU_Summary.F_LoadItems(UInt32 patientID) in d:\DEV\Joystick\Deva_Maria\ModuleAG\Presentation\XU_Summary.cs:line 57
       at Deva_Maria.ModuleAG.Presentation.XU_Summary.F_Load(UInt32 patientID) in d:\DEV\Joystick\Deva_Maria\ModuleAG\Presentation\XU_Summary.cs:line 48
       at Deva_Maria.ModuleAG.XF_G_Main.F_AddControl(e_BaseControlType ctrType) in d:\DEV\Joystick\Deva_Maria\ModuleAG\Presentation\XF_G_Main.cs:line 343
       at Deva_Maria.ModuleAG.XF_G_Main.XF_G_Main_Load(Object sender, EventArgs e) in d:\DEV\Joystick\Deva_Maria\ModuleAG\Presentation\XF_G_Main.cs:line 83
       at System.EventHandler.Invoke(Object sender, EventArgs e)
       at System.Windows.Forms.Form.OnLoad(EventArgs e)
       at DevExpress.XtraEditors.XtraForm.OnLoad(EventArgs e)
       at System.Windows.Forms.Form.OnCreateControl()
       at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
       at System.Windows.Forms.Control.CreateControl()
       at System.Windows.Forms.Control.WmShowWindow(Message& m)
       at System.Windows.Forms.Control.WndProc(Message& m)
       at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
       at System.Windows.Forms.ContainerControl.WndProc(Message& m)
       at System.Windows.Forms.Form.WmShowWindow(Message& m)
       at System.Windows.Forms.Form.WndProc(Message& m)
       at DevExpress.XtraEditors.XtraForm.WndProc(Message& msg)
       at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
       at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
       at System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at DevExpress.Utils.Win.Hook.ControlWndHook.CallWindowProc(IntPtr pPrevProc, IntPtr hWnd, Int32 message, IntPtr wParam, IntPtr lParam)
       at DevExpress.Utils.Win.Hook.ControlWndHook.WindowProc(IntPtr hWnd, Int32 message, IntPtr wParam, IntPtr lParam)
  2. Jan Blessenohl
    Admin
    Jan Blessenohl avatar
    707 posts

    Posted 28 Jan 2014 Link to this post

    Hello,

    we are just passing down the parameter objects that you have given us in the context,ExecuteQuery() call. You are in charge of filling them correctly. Is it possible for you to create MySqlParameter instances?



    Regards,

    Jan Blessenohl
    Telerik
    Telerik has recently updated some of its product names. You can check out the Telerik Product Map here (www.telerik.com/name-mapping). OpenAccess ORM is renamed to Telerik Data Access.
  3. DevCraft banner
  4. Smail
    Smail avatar
    10 posts
    Member since:
    Apr 2013

    Posted 20 Feb 2014 Link to this post

    The problem was that OpenAccess was looking in the GAC  specifically for MySql 6.6.5 connector, we had the newer 6.8.3 version installed and copied as a library to the output folder of the project but again it was just completely ignoring it.
  5. Ady
    Admin
    Ady avatar
    588 posts

    Posted 24 Feb 2014 Link to this post

    Hi Smail,

     Data Access tries to load the version that is resolved using the standard DbProviderFactory mechanism. It tries to the load the version registered in the machine.config. Maybe you should update the entry in the machine.config in order to load the latest version of the MySql connector.

    Regards,
    Ady
    Telerik
    OpenAccess ORM is now Telerik Data Access. For more information on the new names, please, check out the Telerik Product Map.
Back to Top