This is a migrated thread and some comments may be shown as answers.

BUG: MySql Parameters

3 Answers 92 Views
Data Access Free Edition
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Smail
Top achievements
Rank 1
Smail asked on 27 Jan 2014, 03:13 PM
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)

3 Answers, 1 is accepted

Sort by
0
Jan Blessenohl
Telerik team
answered on 28 Jan 2014, 11:14 AM

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.
0
Smail
Top achievements
Rank 1
answered on 20 Feb 2014, 02:34 PM
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.
0
Ady
Telerik team
answered on 24 Feb 2014, 04:19 PM
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.
Tags
Data Access Free Edition
Asked by
Smail
Top achievements
Rank 1
Answers by
Jan Blessenohl
Telerik team
Smail
Top achievements
Rank 1
Ady
Telerik team
Share this question
or