I am using iAnywhere.Data.SQLAnywhere.v3.5 In a Microsoft .Net project, I try to connect to Sql Anywhere server by using SAConnection by passing a connection string in the SAConnection constructor.
I am having trouble open a connection that the database file name is in Chinese, e.g. the following connection string will result in db file not found error:
mySaConnection = new SAConnection(@"UID=DBA;PWD=sql;DBF=C:\\中文名字.db"); mySaConnection.Open();
Does anyone know what I need to do?
Thanks in advance
A couple of questions, and then I'll take a guess:
My guess to the second question is no... since you are using the DBF (aka DatabaseFile) parameter. Note that when you don't specify a server name then the server name is derived from the database filename of the first database started on the server's command line. So in your case the server name of the auto-started database will be the Chinese name.
I believe that there have been some issues when it comes to non-ascii characters in server names. Compounding the issue is the character sets used and whether there are any conversions required between the application, OS, and server character sets. This is why the documentation states:
So I would recommend that you:
answered 10 Sep '13, 08:50