Exemple #1
0
 private static com.sybase.afx.db.DataSourceInfo GetDSI()
 {
     if (DSI != null)
     {
         return DSI;
     }
     com.sybase.afx.db.DataSourceInfo _dsi = new com.sybase.afx.db.DataSourceInfo();
     _dsi.SetConnectionUltraLiteClass();       
     string _tmpConnStr = "DBF=" + GetDbPath() + ";DBN=cRMMobile1_0";
     if(GetConnectionProfile().GetProperty("encryptionKey") != null)
     {
         _tmpConnStr = _tmpConnStr + ";dbkey=" + GetConnectionProfile().GetProperty("encryptionKey");
     }    
     _tmpConnStr = _tmpConnStr + ";CACHE_SIZE=" + GetConnectionProfile().CacheSize;
     _dsi.SetConnectionString(_tmpConnStr);
     _dsi.SetThreadLocal(true);
     _dsi.SetConnectionProfile(GetConnectionProfile());
     DSI = _dsi;
     return _dsi;
 }