I have installed iAnywhere12 on my PC and on my windows mobile Device(With windows Mobile6.1). I opened up Sybase Central(12) and have created a Db named "test.db" with just 1 column "mynum" as decimal(With default uid="DBA", PWD="sql"). Now in my VS VB code, I have a connection to this Sybase DB. But I ca't connect to it in any way. I put the test.db in my Mobile folder: \Storage Card\CMDATA\PRODtestdb.db and I have dbsrv12.exe in my mobile folder \Program Files\SQLAny12\dbsrv12.exe. ------The VB code Imports iAnywhere.Data.SQLAnywhere Private Const CONNECTION_TIMEOUT As Integer = 60 Private Const DBSERVER_EXE As String = "\Program Files\SQLAny12\dbsrv12.exe" Private Const CASEMAN_DB_FILE As String = "\Storage Card\CMDATA\PROD\test.db" Dim connection As New SAConnection Dim userId As String = "DBA" Dim password As String = "sql" Dim connectionString As String = String.Format("UID={0};PWD={1};DBF={2};Connect Timeout={3};START= {4} -q -ga", userId, password, CASEMAN_DB_FILE, CONNECTION_TIMEOUT, DBSERVER_EXE) connection = New SAConnection(connectionString) connection.Open() =====Its crushing when trying to connect. I saw dbsrv12.exe is running but can't connect to the test.db file. Why I removed the uid and pass word and tried and did not work: Dim connectionString As String = String.Format("DBF={0};START= {1}", CASEMAN_DB_FILE, DBSERVER_EXE) connection = New SAConnection(connectionString) connection.Open() -----Crushing here |
Open
method is throwing an exception or is the entire program really completely crashing and exiting? If it's throwing an exception, can you add atry { ... } catch { ... }
around the operation and grab the exception details and stack?I found the issue. I am running SQL Any12 with CF 3.5. I think When the database was created using Sybase Central12, it was based on ICU language set. I created a test database with UTF8BIN and the same code runs perfect, no connection problem. Does Sybase Central 12 has default set of collation to ICU when you create a new database?
Now how can I change my database file that is based on ICU into UTF8BIN? Its a huge dtabase file with lots of tables. we don't want to create it again.