Problem solved by reinstalling Sybase IQ drivers and updating to latest version of iAnywhere.Data.SQLAnywhere.
Failed to load native dll (C:\Users\[Username]\AppData\Local\Temp\...\dbdata.dll
-
31-05-2022 - |
Pergunta
I'm trying to create an SAConnection into a Sybase IQ database. I'm attempting to create the connection through a simple visual studio C# application.
My code fails at:
SAConnection connection = new SAConnection(connString);
And pops up with a message box:
SQL Anywhere ADO.NET DataProvider
Failed to load native dll (C:\Users\<Username>\AppData\Local\Temp\{16AA8FB8-4A98-4757-B7A5-0FF22C0A6E33}_0\dbdata.dll
The code subsequently throws an exception:
"The type initializer for 'iAnywhere.Data.SQLAnywhere.SAConnection' threw an exception" with InnerException as described in the message box.
I've checked and double checked the connection string and am confident it is correct. I am using iAnywhere.Data.SQLAnywhere version 11.0.0.11292 and am connecting to a Sybase IQ database. I am running Win7 64 bit and can connect to the database without a problem in Aqua Data Studio. Any ideas on this would be great.
Solução
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow