BUG system.Data.ODBC is not supported

Hi,
just update to 8.11.2425415001 2024-09-10 and my python script doesn’t work anymore.

Screenshot 2024-09-20 082502

I’m back on Rhino 7 (again) beacuse the same script works just fine!

@enzo_molinari

  • Would you mind sharing the report from SystemInfo command here
  • Try adding # r nuget "System.Data.Odbc" to the top of your Python 2 script like. Test the script below in the new ScriptEditor and see if it works (create a new IronPython script)
#! python 2
# r nuget "System.Data.Odbc"

import clr
clr.AddReference('System.Data')

from System.Data.Odbc import OdbcConnection, OdbcCommand, OdbcDataReader

print(OdbcConnection, OdbcCommand, OdbcDataReader)

Hi @eirannejad, this is my systeminfo…

System info.txt (2.7 KB)

I don’t understand why the same script ( on the same system) works on rhino7 and does not work on the latest rhino8.11.2425415001 2024-09-10 relise, what has changed since the previous relise?

I’ll give your solution to the IT guy who wrote the script that has worked so far and I’ll let you know

The problem seems to be running this library on the dotnet core which is the default runtime for Rhino 8 (That is one of the major differences with Rhino 7)

  • Run SetDotnetRuntime in Rhino and set to .NET Framework. Restart Rhino and test the script to see if it works.
  • It would be nice if you can run this script in both Rhino .Net Core and .NET Framework so I can see which System.Data.Odbc assembly actually gets loaded on your machine. test_rhino_odbc.py (572 Bytes)

ok @eirannejad,
but what changed between 8.10 and 8.11?

Very hard question to answer :smiley: I can help better if you can run the test script above on both 8.10 (where you don’t see the issue) and 8.11 (where the issue exists) and see if the loaded ODBC dll is different.

Hi @eirannejad

tested your script on 8.11

.NET Framework

.Net Core

with .NET Framework my script works!

thank you for your help.

Hey @enzo_molinari,

Could you see if this file exists on your system?

C:\Program Files\Rhino 8\System\netcore\runtimes\win\lib\net7.0\System.Data.Odbc.dll

If it does not, repairing your Rhino installation would help.

Hi @curtisw ,
I couldn’t find it, so I repaired the installation.
My script now works with both .NET Framework and .Net Core mode.

thanks for your help!

1 Like

Thanks for testing and updating us here @enzo_molinari