Closed thomasw-mitutoyo-ctl closed 6 years ago
Hi Thomas. That is very simple code and should work. Are you able to provide a simple project that I can compile and run on my end? It's possible that there's some authentication issues though you should have gotten a more specific exception.
I don't think there should be authentication issues. I have implemented the same query using plain MySql.Data methods and it works. I have even referenced the password and user information from that code.
I have sent you the complete source code (almost MCVE: plain MySql.Data implementation + Shaolinq) via email. I'm using VS 2015 Enterprise and the solution is targeting .NET 4.5.2
This appears to be a problem introduced with MySql 6.10.5
. For now, could you try downgrading to MySql 6.9.10
? I'll look into what's changed.
Unfortunately, downgrading to 6.9.10 resulted in a version conflict. I got a FileLoadException, which can be bypassed by removing the following assembly redirection in the app.config:
<runtime>
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
<dependentAssembly>
<assemblyIdentity name="MySql.Data" publicKeyToken="c5687fc88969c44d" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-6.10.5.0" newVersion="6.10.5.0" />
</dependentAssembly>
</assemblyBinding>
</runtime>
I've pushed out a fix in Shaolinq version 1.3.1.1240. It should be available on NuGet momentarily. Let me know if it solves it for you.
Thanks, the new version seems ok. I had to re-enable above assembly redirection and it works again.
I have some fairly simple database and some fairly simple code (IMHO). When I run it, I always get a MySqlException "Invalid attempt to Read when reader is closed."
It happens with or without
scope
. It happens withToList()
andToListAsync()
.I am working with the Nuget packages Shaolinq.MySql 1.3.1.1208. Shaolinq 1.3.1.1208 Platform.Xml.Serialization 1.2.1.291 Platform.NET 1.2.1.291 MySql.Data 6.10.5