SQL CLR System.TypeInitializationException when using .NET Builder DLL inside SQL Server
1 view (last 30 days)
Show older comments
I created a DLL using Matlab Builder NE to read return the data of a mat file. The target framework is .NET 2.0
I can use the DLL from a console or windows form app without problems. But as soon as i use it from within an SQL CLR Project in SQL Server 2008 on x64, i get this error message when my class is initialized:
Meldung 6522, Ebene 16, Status 1, Zeile 1 .NET Framework-Fehler beim Ausführen der benutzerdefinierten Routine oder des benutzerdefinierten Aggregats 'udf_ReadMaskFile': System.TypeInitializationException: Der Typeninitialisierer für "MaskFileReader.MLMaskFileReader" hat eine Ausnahme verursacht. ---> System.ArgumentOutOfRangeException: StartIndex darf nicht kleiner als Null sein. Parametername: startIndex System.ArgumentOutOfRangeException: bei System.String.Remove(Int32 startIndex, Int32 count) bei MaskFileReader.MLMaskFileReader..cctor() System.TypeInitializationException: bei MaskFileReader.MLMaskFileReader..ctor() bei MultispectralDB.UserDefinedFunctions.udf_ReadMaskFile(String path)
My DLL has other methods that don't use MATLAB functions. They all run fine.
The Deploy system has the same (full) installation of Matlab as my development system.
Any idea how to fix this?
0 Comments
Answers (0)
See Also
Categories
Find more on MATLAB Compiler SDK in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!