Reputation: 367
I have a Sybase client app, which is written in C# using ADO.Net 4.0. Code has reference to Sybase.AdoNet4.AseClient.dll assembly file.
On my (DEV)box, app works perfectly and no issue.
When I move this app, along with Sybase.AdoNet4.AseClient.dll file on to a Windows 2008 server (#1), and run the app.. it is unable to get a successful connection to Sybase DB! It is throwing below error.
Client unable to establish a connection
Checked stack trace message, it not useful.
at Sybase.Data.AseClient1.AseConnection.Open() at Sybase.Data.AseClient.AseConnection.Open()
Connection string is made up of Data Source=xxx.xxx.xxx.xxx; Port=1234; Database=dbname; Uid=username; Pwd=password; ConnectionIdleTimeout=nnn;
Data Source=xxx.xxx.xxx.xxx is Server(#2) and it is pingable and no issue there (response time<1ms TTL=255).
Upvotes: 1
Views: 5201
Reputation: 231
Try adding Charset=iso_1
(or the appropriate charset) to your connection string. This resolved my issue.
e.g.:
Data Source=xxx.xxx.xxx.xxx; Port=1234; Database=dbname; Uid=username; Pwd=password; ConnectionIdleTimeout=nnn;
would now be:
Data Source=xxx.xxx.xxx.xxx; Port=1234; Database=dbname; Uid=username; Pwd=password; ConnectionIdleTimeout=nnn;Charset=iso_1;
Upvotes: 3