SSL-Net packages out of sync

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

SSL-Net packages out of sync

Post by Zero-G. » Fri 01 Jul 2011 14:25

Hey

I use your latest tools for mySQL in VB.NET 2010
I changed my security level in my Software to SSL encryption.
It works fine.
My application uses LinQ and since I changed the security level, I get sometimes an error, which says, that the net packages are out of sync.
This happens about 2-3 times per day.

Is there some information about this? - I know, that this is not a reproduceable error, but I want to know, when this kind of error occurs. - and maybe with some server tuning, I can reduce such error prompts!?

THX for every tipp you can give to me.

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Mon 04 Jul 2011 16:48

Could you please specify the exact message and stack trace of these exceptions?

Also, please provide an approximate connection string you are using; in particular, please specify whether you are connecting via the MySQL client library (i.e., whether the Direct connection string parameter is set to false).

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

Post by Zero-G. » Tue 19 Jul 2011 06:29

Hey
Sorry for the late reply.
Now I got it again:

************** Exception Text **************
Devart.Data.Linq.LinqCommandExecutionException: Error on executing DbCommand. ---> Devart.Data.MySql.MySqlException: Lost connection to MySQL server during query ---> Devart.Security.SSL.al: The handshake procedure was not completed successfully before application data was received.
at Devart.Common.ak.b(Byte[] A_0, Int32 A_1, Int32 A_2)
at Devart.Common.at.c(Byte[] A_0, Int32 A_1, Int32 A_2)
at Devart.Common.s.e(Byte[] A_0, Int32 A_1, Int32 A_2)
--- End of inner exception stack trace ---
at Devart.Data.MySql.bh.a(Exception A_0)
at Devart.Common.s.e(Byte[] A_0, Int32 A_1, Int32 A_2)
at Devart.Data.MySql.bk.a(Int32& A_0, Int32& A_1)
at Devart.Data.MySql.bk.a(Byte[] A_0, Int32 A_1, Int32 A_2)
at Devart.Data.MySql.bk.a()
at Devart.Data.MySql.bk.d()
at Devart.Data.MySql.u.a(ah[]& A_0, Int32& A_1)
at Devart.Data.MySql.u.a(Byte[] A_0, Int32 A_1, Boolean A_2)
at Devart.Data.MySql.a3.e()
at Devart.Data.MySql.a3.o()
at Devart.Data.MySql.MySqlCommand.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords)
at Devart.Common.DbCommandBase.InternalExecute(CommandBehavior behavior, IDisposable stmt, Int32 startRecord, Int32 maxRecords, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior, Boolean nonQuery)
at Devart.Common.DbCommandBase.ExecuteDbDataReader(CommandBehavior behavior)
at System.Data.Common.DbCommand.System.Data.IDbCommand.ExecuteReader()
at Devart.Data.Linq.Provider.DataProvider.ExecuteQuery(CompiledQuery compiledQuery, Object[] parentArgs, Object[] userArgs, Object lastResult)
--- End of inner exception stack trace ---
at Devart.Data.Linq.LinqCommandExecutionException.CanThrowLinqCommandExecutionException(String message, Exception e)
at Devart.Data.Linq.Provider.DataProvider.ExecuteQuery(CompiledQuery compiledQuery, Object[] parentArgs, Object[] userArgs, Object lastResult)
at Devart.Data.Linq.Provider.DataProvider.ExecuteAllQueries(CompiledQuery compiledQuery, Object[] userArguments)
at Devart.Data.Linq.Provider.DataProvider.CompiledQuery.Devart.Data.Linq.Provider.ICompiledQuery.Execute(IProvider provider, Object[] userArgs)
at Devart.Data.Linq.Provider.DeferredQuery`3.a(TKeyQuery A_0)
at Devart.Data.Linq.Provider.DeferredSource`2.b()
at System.Data.Linq.EntitySet`1.Load()
at System.Data.Linq.EntitySet`1.get_Count()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at System.Data.Linq.EntitySet`1.GetNewBindingList()
at System.Data.Linq.EntitySet`1.System.ComponentModel.IListSource.GetList()
at System.Windows.Forms.ListBindingHelper.GetList(Object list)
at System.Windows.Forms.ListBindingHelper.GetListItemType(Object list)
at System.Windows.Forms.BindingSource.SetList(IList list, Boolean metaDataChanged, Boolean applySortAndFilter)
at System.Windows.Forms.BindingSource.ResetList()
at System.Windows.Forms.BindingSource.set_DataSource(Object value)
at VOPT.ISAuftrag.SetDetailDaten()
at VOPT.ISAuftrag.rdbFakturiert_CheckedChanged(Object sender, EventArgs e)
at Janus.Windows.EditControls.UIRadioButton.OnCheckedChanged(EventArgs e)
at Janus.Windows.EditControls.UIRadioButton.set_Checked(Boolean value)
at Janus.Windows.EditControls.UIRadioButton.OnClick(EventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.235 (RTMGDR.030319-2300)
CodeBase: file:///C:/Windows/Microsoft.NET/Framework/v4.0.30319/mscorlib.dll
----------------------------------------
VOPT
Assembly Version: 1.2.1.6
Win32 Version: 1.1.99.9
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/VOPT.exe
----------------------------------------
Microsoft.VisualBasic
Assembly Version: 10.0.0.0
Win32 Version: 10.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Microsoft.VisualBasic/v4.0_10.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualBasic.dll
----------------------------------------
System
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.232 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Core
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.235 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Windows.Forms/v4.0_4.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Drawing
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Drawing/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Devart.Data.Linq
Assembly Version: 2.50.24.0
Win32 Version: 2.50.24.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/Devart.Data.Linq.DLL
----------------------------------------
System.Data.Linq
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Data.Linq/v4.0_4.0.0.0__b77a5c561934e089/System.Data.Linq.dll
----------------------------------------
IntelliSoft
Assembly Version: 1.2.0.2
Win32 Version: 1.2.0.2
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/IntelliSoft.DLL
----------------------------------------
Janus.Windows.GridEX.v4
Assembly Version: 4.0.14.0
Win32 Version: 4.0.14.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/Janus.Windows.GridEX.v4.DLL
----------------------------------------
Janus.Windows.Common.v4
Assembly Version: 4.0.14.0
Win32 Version: 4.0.14.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/Janus.Windows.Common.v4.DLL
----------------------------------------
System.Configuration
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
System.Xml
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
Devart.Data.MySql
Assembly Version: 6.30.165.0
Win32 Version: 6.30.165.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/Devart.Data.MySql.DLL
----------------------------------------
System.Data
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data/v4.0_4.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
System.Transactions
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Transactions/v4.0_4.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
Devart.Data
Assembly Version: 5.0.265.0
Win32 Version: 5.0.265.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/Devart.Data.DLL
----------------------------------------
System.EnterpriseServices
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.EnterpriseServices/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
Devart.Data.MySql.Linq
Assembly Version: 2.50.24.0
Win32 Version: 2.50.24.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/Devart.Data.MySql.Linq.DLL
----------------------------------------
Anonymously Hosted DynamicMethods Assembly
Assembly Version: 0.0.0.0
Win32 Version: 4.0.30319.235 (RTMGDR.030319-2300)
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/mscorlib/v4.0_4.0.0.0__b77a5c561934e089/mscorlib.dll
----------------------------------------
System.Numerics
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Numerics/v4.0_4.0.0.0__b77a5c561934e089/System.Numerics.dll
----------------------------------------
System.Data.OracleClient
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 (RTMRel.030319-0100)
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Data.OracleClient/v4.0_4.0.0.0__b77a5c561934e089/System.Data.OracleClient.dll
----------------------------------------
Janus.Windows.UI.v4
Assembly Version: 4.0.14.0
Win32 Version: 4.0.14.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/Janus.Windows.UI.v4.DLL
----------------------------------------
Janus.Windows.ExplorerBar.v4
Assembly Version: 4.0.14.0
Win32 Version: 4.0.14.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/Janus.Windows.ExplorerBar.v4.DLL
----------------------------------------
Janus.Windows.Ribbon.v4
Assembly Version: 4.0.14.0
Win32 Version: 4.0.14.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/Janus.Windows.Ribbon.v4.DLL
----------------------------------------
Janus.Data.v4
Assembly Version: 4.0.14.0
Win32 Version: 4.0.14.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/Janus.Data.v4.DLL
----------------------------------------
DevComponents.DotNetBar2
Assembly Version: 7.0.0.1
Win32 Version: 7.0.0.1
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/DevComponents.DotNetBar2.DLL
----------------------------------------
Janus.Windows.ButtonBar.v4
Assembly Version: 4.0.14.0
Win32 Version: 4.0.14.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/Janus.Windows.ButtonBar.v4.DLL
----------------------------------------
Janus.Windows.Schedule.v4
Assembly Version: 4.0.14.0
Win32 Version: 4.0.14.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/Janus.Windows.Schedule.v4.DLL
----------------------------------------
Accessibility
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.1 built by: RTMRel
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/Accessibility/v4.0_4.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------
IntelliSoftPlugin
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/IntelliSoftPlugin.DLL
----------------------------------------
combit.ListLabel16
Assembly Version: 16.3.4080.25436
Win32 Version: 16.3.0.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/combit.ListLabel16.DLL
----------------------------------------
System.Web
Assembly Version: 4.0.0.0
Win32 Version: 4.0.30319.206 built by: RTMGDR
CodeBase: file:///C:/Windows/Microsoft.Net/assembly/GAC_32/System.Web/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Web.dll
----------------------------------------
IntelliSoft
Assembly Version: 1.0.0.1
Win32 Version: 1.0.0.1
CodeBase: file:///C:/Users/Scheibbs.OPTIKBACIK/Documents/Visual%20OPT%20.NET/PlugIn/ISRodenstock.dll
----------------------------------------
Janus.Windows.FilterEditor.v4
Assembly Version: 4.0.14.0
Win32 Version: 4.0.14.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/Janus.Windows.FilterEditor.v4.DLL
----------------------------------------
Janus.Windows.CalendarCombo.v4
Assembly Version: 4.0.14.0
Win32 Version: 4.0.14.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/Janus.Windows.CalendarCombo.v4.DLL
----------------------------------------
DevExpress.XtraLayout.v10.1
Assembly Version: 10.1.8.0
Win32 Version: 10.1.8.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/DevExpress.XtraLayout.v10.1.DLL
----------------------------------------
DevExpress.Utils.v10.1
Assembly Version: 10.1.8.0
Win32 Version: 10.1.8.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/DevExpress.Utils.v10.1.DLL
----------------------------------------
DevExpress.Data.v10.1
Assembly Version: 10.1.8.0
Win32 Version: 10.1.8.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/DevExpress.Data.v10.1.DLL
----------------------------------------
DevExpress.XtraEditors.v10.1
Assembly Version: 10.1.8.0
Win32 Version: 10.1.8.0
CodeBase: file:///C:/Program%20Files/Visual%20OPT%20.NET/DevExpress.XtraEditors.v10.1.DLL
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:





When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


THX

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Wed 20 Jul 2011 15:31

Could you please specify the approximate (without the credentials) connection string you are using? Also, what is the version of the MySQL server you are connecting to?

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

Post by Zero-G. » Wed 20 Jul 2011 15:43

Hey

Of course:
User Id="";Password=;Host=;Port=;Database="";Compress=True;Protocol=Ssl;Persist Security Info=True;SSL CA Cert=resource://VOPT.ca-cert.pem;SSL Cert=resource://VOPT.client-cert.pem;SSL Key=resource://VOPT.client-key.pem;
My SQL Server Version:
5.5.11-enterprise-commercial-advanced-log
THX

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Thu 21 Jul 2011 17:09

Please try connecting to this server and executing a simple command via ADO.NET, e.g.,

Code: Select all

Dim con As New MySqlConnection([place the connection string here])
con.Open()
Dim cmd As New MySqlCommand("select 1", con)
Dim res = cmd.ExecuteScalar
Console.WriteLine(res)
Console.Read()
Please tell us if the problem persists in this case.

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

Post by Zero-G. » Fri 22 Jul 2011 07:12

Hey

It happens not each time, but when running this command a few times, it happens.

THX

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Fri 22 Jul 2011 11:54

We couldn't reproduce the problem in our environment.

Could you please specify the following, so that we are able to analyze the situation in more details:
- whether the command is executed several times on the same connection, or a new connection is opened each time;
- the stack trace of the exception you are getting when running the ADO.NET code;
- if you are connecting to a local or remote server.

If possible, please also try connecting to some other server instance; please tell us if the problem occurs in this case as well.

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

Post by Zero-G. » Fri 22 Jul 2011 12:16

Hey
The command is executed as LinQ, so I think, the connection is opened each time!

The stacktrace:

Code: Select all

   bei Devart.Data.Linq.LinqCommandExecutionException.CanThrowLinqCommandExecutionException(String message, Exception e)
   bei Devart.Data.Linq.Provider.DataProvider.ExecuteQuery(CompiledQuery compiledQuery, Object[] parentArgs, Object[] userArgs, Object lastResult)
   bei Devart.Data.Linq.Provider.DataProvider.ExecuteAllQueries(CompiledQuery compiledQuery, Object[] userArguments)
   bei Devart.Data.Linq.Provider.DataProvider.CompiledQuery.Devart.Data.Linq.Provider.ICompiledQuery.Execute(IProvider provider, Object[] userArgs)
   bei Devart.Data.Linq.Provider.DeferredQuery`3.a(TKeyQuery A_0)
   bei Devart.Data.Linq.Provider.DeferredSource`2.b()
   bei System.Data.Linq.EntitySet`1.Load()
   bei System.Data.Linq.EntitySet`1.get_Count()
   bei System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   bei System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   bei System.Data.Linq.EntitySet`1.GetNewBindingList()
   bei System.Data.Linq.EntitySet`1.System.ComponentModel.IListSource.GetList()
   bei System.Windows.Forms.ListBindingHelper.GetList(Object list)
   bei System.Windows.Forms.ListBindingHelper.GetListItemType(Object list)
   bei System.Windows.Forms.BindingSource.SetList(IList list, Boolean metaDataChanged, Boolean applySortAndFilter)
   bei System.Windows.Forms.BindingSource.ResetList()
   bei System.Windows.Forms.BindingSource.set_DataSource(Object value)
   bei VOPT.ISAuftrag.SetDetailDaten() in C:\Users\Intelli Soft\Documents\Visual Studio 2010\Projects\Visual OPT .NET\Vopt\VOPT\UserControl\Basis\ISAuftrag.vb:Zeile 43.
   bei VOPT.ISAuftrag.rdbOffen_CheckedChanged(Object sender, EventArgs e) in C:\Users\Intelli Soft\Documents\Visual Studio 2010\Projects\Visual OPT .NET\Vopt\VOPT\UserControl\Basis\ISAuftrag.vb:Zeile 409.
   bei Janus.Windows.EditControls.UIRadioButton.OnCheckedChanged(EventArgs e)
   bei Janus.Windows.EditControls.UIRadioButton.set_Checked(Boolean value)
   bei Janus.Windows.EditControls.UIRadioButton.OnClick(EventArgs e)
   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
   bei System.Windows.Forms.Control.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(IntPtr 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.RunDialog(Form form)
   bei System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
   bei System.Windows.Forms.Form.ShowDialog()
   bei VOPT.VisualOPTNet.Init() in C:\Users\Intelli Soft\Documents\Visual Studio 2010\Projects\Visual OPT .NET\Vopt\VOPT\Modul\VisualOPTNet.vb:Zeile 26.
   bei VOPT.Start.Main() in C:\Users\Intelli Soft\Documents\Visual Studio 2010\Projects\Visual OPT .NET\Vopt\VOPT\Modul\Start.vb:Zeile 40.
   bei System.AppDomain._nExecuteAssembly(RuntimeAssembly 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, Boolean ignoreSyncCtx)
   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   bei System.Threading.ThreadHelper.ThreadStart()
I connect to a remote server on the internet.

The code I run is in a CheckBox_CheckedChanged event

and looks like this:

Code: Select all


    Public Sub SetDetailDaten()
        If KundenId = -1 Then
            Exit Sub
        End If
        CachedContext = New VOptNeuContext.VOptNeuDataContext(mySQL.GetConnectionString)
        Dim Platzhalter As Integer = IIf(rdbOffen.Checked, 0, 1)
        Dim dlo As New Devart.Data.Linq.DataLoadOptions
        dlo.AssociateWith(Of Kundenstamm)(Function(x As Kundenstamm) _
                                              x.Auftrags.Where(Function(Auf As Auftrag) _
                                                                   Auf.Bewegung = Platzhalter _
                                                                   And Auf.Auftrag1 = _
                                                                   [Enum].GetName(GetType(VisualOPTNet.Auftragstyp), _myTyp).ToString))

        CachedContext.LoadOptions = dlo
        Dim KuDaten = (From Customer In CachedContext.Kundenstamms Where _
                       Customer.Kundenid = KundenId).SingleOrDefault
        nKundendaten = KuDaten
        bsKundenstamm.DataSource = nKundendaten
        bsKundenstamm.DataMember = "Auftrags"
    End Sub
and the error happens at bsKundenstamm.DataSource=nKundendaten

StanislavK
Devart Team
Posts: 1710
Joined: Thu 03 Dec 2009 10:48

Post by StanislavK » Mon 25 Jul 2011 10:17

As far as I've understood, you were able to reproduce the problem when running the 'plain' ADO.NET code (i.e., when using MySqlConnection and MySqlCommand objects only, without the LINQ queries, as in the sample I've posted above). Please confirm this, and specify the stack trace you are getting in this case.

If the problem can be reproduced only when running a LINQ query, please specify the SQL command generated for this query, or the definitions of the Kundenstamm and Auftrag tables.

At the moment, we couldn't reproduce the problem either with 'plain' ADO.NET or when using LinqConnect.

Post Reply