2

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

Florian
  • 1,827
  • 4
  • 30
  • 62

2 Answers2

1

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

Community
  • 1
  • 1
Florian
  • 1,827
  • 4
  • 30
  • 62
1

Extra info

You need to put dblgde12.dll and dblgen12.dll in the project folder \bin\debug

As for the connection string i'm using this one.

SAConnection conn = new SAConnection("ENG=LXDBSRV;DBN=database;UID=username;PWD=password;POOLING =FALSE;LINKS=tcpip{Host=PC-g};CS=utf-8");

Other way is :

SAConnection conn = new SAConnection("DSN=LXSYDSN;UID=username;PWD=password;DBF=c:\\LxOffice.db");
F T
  • 88
  • 1
  • 10