Search code examples
c#sqlanywheresybase-asa

Connect to SQL Anywhere - dblgen12.dll not found


I try to connect to a SQL Anywhere 12 database with the iAnywhere.Data.SQLAnywhere.v4.0.dll.

On the database server this connection is successful, however on any other PC's I get the error Language Ressourcefile not found<dblgde12.dll, dblgen12.dll>.

Orginal (german) error message here, unfortunately even on my english system the error message is in german. enter image description here

I have found these files on the installation directory of the sql server, but I don't know what to do with them, since I can't install them in the gac.

The Connection:

iAnywhere.Data.SQLAnywhere.SAConnection connection = new SAConnection();
connection.ConnectionString = new SAConnectionStringBuilder(){  DatabaseName = "123", UserID = "123", Password =
                    "123", ServerName = "123" , Host = "10.11.11.10"}.ConnectionString;
connection.Open();

Thanks


Solution

  • After some more time asking google I found the following question asked: http://sqlanywhere-forum.sap.com/questions/19449/cannot-find-the-language-resource-file-dblgen12dll

    The accepted answer links to http://dcx.sybase.com/index.html#1201/en/dbadmin/da-install-s-5107108.html, where is explained where the dll looks for the files.

    On Windows, SQL Anywhere searches the following paths relative to each location in the preceding list:

    .

    ..

    .\bin32 and ..\bin32 (32-bit programs only)

    .\bin64 and ..\bin64 (64-bit programs only)

    .\java (for Java-related files)

    ..\java (for Java-related files)

    .\scripts (for SQL script files)

    ..\scripts (for SQL script files)

    The necessary files can be found here http://dcx.sybase.com/index.html#1201/en/dbprogramming/deploying-adonet-deploy.html

    All these files can be found on a SQL Anywhere Installation 12 in the following directory: C:\Program Files\Sybase\SQL Anywhere 12