Refresh Mode does not work as I want

Discussion of open issues, suggestions and bugs regarding LinqConnect – Devart's LINQ to SQL compatible ORM
Post Reply
Zero-G.
Posts: 398
Joined: Sat 09 Dec 2006 12:20

Refresh Mode does not work as I want

Post by Zero-G. » Tue 16 Feb 2010 10:15

Hey

Using Linq to mySQL when using the the following code:

Code: Select all

            LinqProvider.GetProvider.Refresh(Data.Linq.RefreshMode.OverwriteCurrentValues)    

            Me.nKundendaten = (From Query In LinqProvider.GetProvider.Kundenstamms _
                               Where Query.Kundenid = KundenId).Single
Then the customer itself is refreshed correct, but the associated tables still have the old values, not the one from the DB.
Please take a look to this. - THX

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Tue 16 Feb 2010 15:26

Thank you for the bug report.
We will fix the wrong behaviour, the call of Regresh() with empty params list should cause an exception.
To Refresh the master collection with details you should pass to the Refresh method the master collection with already loaded detail collections.

Zero-G.
Posts: 398
Joined: Sat 09 Dec 2006 12:20

Post by Zero-G. » Fri 26 Feb 2010 15:34

Hey

Using the latest available build, still brings an error:

Using the following code:

Code: Select all

                LinqProvider.GetProvider.Refresh(Data.Linq.RefreshMode.OverwriteCurrentValues, LinqProvider.GetProvider.Kundenstamms)
Error Message:
{"Commands out of sync; You can't run this command now"}

Stack Trace:
" bei Devart.Data.Linq.LinqCommandExecutionException.a(String A_0, Exception A_1) bei Devart.Data.Linq.Provider.DataProvider.a(b A_0, Object[] A_1, Object[] A_2, Object A_3) bei Devart.Data.Linq.Provider.DataProvider.a(b A_0, Object[] A_1) bei Devart.Data.Linq.Provider.DataProvider.b.a(b A_0, Object[] A_1) bei Devart.Data.Linq.Provider.DeferredQuery`3.a(TKeyQuery A_0) bei Devart.Data.Linq.Provider.DefferedEntity`4.a(TKeyQuery A_0) bei Devart.Data.Linq.Provider.DeferredSource`2.b() bei Devart.Data.Linq.Provider.DeferredSource`2.a() bei Devart.Data.Linq.q.a(Object A_0) bei Devart.Data.Linq.DataContext.Refresh(RefreshMode mode, IEnumerable entities) bei VOPT.ISAuftrag.SetData() in C:\Users\Intelli Soft\Documents\Visual Studio 2008\Projects\Visual OPT .NET - Kopie\Vopt\VOPT\UserControl\Basis\ISAuftrag.vb:Zeile 32. bei VOPT.ISAuftrag.LoadData(Kundenstamm KundenDaten, Auftragstyp Typ) in C:\Users\Intelli Soft\Documents\Visual Studio 2008\Projects\Visual OPT .NET - Kopie\Vopt\VOPT\UserControl\Basis\ISAuftrag.vb:Zeile 89. bei VOPT.usrKundenstamm.cmdHandelsware_Click(Object sender, CommandEventArgs e) in C:\Users\Intelli Soft\Documents\Visual Studio 2008\Projects\Visual OPT .NET - Kopie\Vopt\VOPT\UserControl\usrKundenstamm.vb:Zeile 283. bei Janus.Windows.Ribbon.CommandBase.OnClick(CommandEventArgs e) bei Janus.Windows.Ribbon.CommandBase.InvokeOnClick() bei Janus.Windows.Ribbon.ButtonCommand.InvokeOnClick() bei Janus.Windows.Ribbon.JNSD.OnMouseUp(MouseEventArgs e) bei Janus.Windows.Ribbon.JNSAO.OnMouseUp(MouseEventArgs e) bei Janus.Windows.Ribbon.JNSCE.OnMouseUp(MouseEventArgs e) bei Janus.Windows.Ribbon.JNSCM.a(MouseEventArgs ) bei Janus.Windows.Ribbon.Ribbon.OnMouseUp(MouseEventArgs e) bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks) bei System.Windows.Forms.Control.WndProc(Message& m) bei Janus.Windows.Ribbon.Ribbon.WndProc(Message& m) bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m) bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m) bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam) bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg) bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData) bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context) bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context) bei System.Windows.Forms.Application.Run(Form mainForm) bei VOPT.VisualOPTNet.Init() in C:\Users\Intelli Soft\Documents\Visual Studio 2008\Projects\Visual OPT .NET - Kopie\Vopt\VOPT\Modul\VisualOPTNet.vb:Zeile 18. bei VOPT.Start.Main() in C:\Users\Intelli Soft\Documents\Visual Studio 2008\Projects\Visual OPT .NET - Kopie\Vopt\VOPT\Modul\Start.vb:Zeile 31. bei System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args) bei System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args) bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly() bei System.Threading.ThreadHelper.ThreadStart_Context(Object state) bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state) bei System.Threading.ThreadHelper.ThreadStart()"

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Fri 26 Feb 2010 16:42

Thank you for the report, we have reproduced the problem.
I will let you know about the results of our investigation.

Zero-G.
Posts: 398
Joined: Sat 09 Dec 2006 12:20

Post by Zero-G. » Wed 03 Mar 2010 12:23

Hey

How long will it take to get an update about this problem?
I am waiting with a productiv program for this fix!

THX

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Wed 03 Mar 2010 14:34

We have fixed the problem.
Look forward to the next build.

Zero-G.
Posts: 398
Joined: Sat 09 Dec 2006 12:20

Post by Zero-G. » Wed 03 Mar 2010 14:53

Hey

Do you have a timeframe for this release - please!?
Hope this week!?

THX

AndreyR
Devart Team
Posts: 2919
Joined: Mon 07 Jul 2008 13:16

Post by AndreyR » Thu 04 Mar 2010 08:26

New build of dotConnect for MySQL 5.70.102 Beta is available for download now.

Zero-G.
Posts: 398
Joined: Sat 09 Dec 2006 12:20

Post by Zero-G. » Thu 04 Mar 2010 10:09

Thanks, that was an exemplary behavior

Post Reply