Esempio n. 1
0
 public override IDbConnection openDbConnection(CXLReportConfig cfg) {
   if (cfg.dbSession != null)
     return cfg.dbSession.GetConnection();
   else { 
     if((this._dbSess == null) && !String.IsNullOrEmpty(cfg.connStr))
       this._dbSess = new DBSession(cfg.connStr);
     if (this._dbSess != null)
       return this._dbSess.GetConnection();
     else
       return null;
   }
 }
 public void connTest() {
   var sess = new DBSession("Password=j12;Persist Security Info=True;Connection Lifetime=10;Max Pool Size=15;User ID=GIVC_PUB;Data Source=GIVCDB_EKBS02");
   var cr = SQLCursor.CreateAndOpenCursor(sess, "select * from ORGM$ORGWWW", null, 60);
   while (cr.Next()) {
     System.Console.WriteLine("...");
   }
   cr.Close();
 }