Esempio n. 1
0
        protected DatabaseBase(DatabaseAccessToken accessToken)
        {
            this.zConnectionString = this.GetConnectionString(accessToken);

            this.CreateConnection();

            this.Open();
        }
        public static DatabaseAccessToken GetToken(DatabaseAuthentication authentication, string databaseInterfacesFileRootedPath)
        {
            Dictionary<string, DatabaseInterface> interfaces = DatabaseInterface.LoadDatabaseInterfaces(databaseInterfacesFileRootedPath);

            DatabaseInterface curInterface = interfaces[authentication.DatabaseID];

            DatabaseAccessToken retValue = new DatabaseAccessToken(curInterface, authentication);
            return retValue;
        }
Esempio n. 3
0
        protected override string GetConnectionString(DatabaseAccessToken accessToken)
        {
            string connectionStringMask = @"Driver={{Adaptive Server Enterprise}};NA={0},{1};DB={2};UID={3};PWD={4};WorkArounds2=32768;TextSize=2147483647;ServerInitiatedTransactions=0";
            string retValue = String.Format(connectionStringMask,
                accessToken.Interface.ServerAddress,
                accessToken.Interface.Port,
                accessToken.Interface.DatabaseName,
                accessToken.Authentication.UserName,
                accessToken.Authentication.Password);

            return retValue;
        }
 public DatabaseAccessLayerBase(DatabaseAccessToken accessToken)
 {
     this.zSybaseDatabase = new SybaseDatabase(accessToken);
 }
Esempio n. 5
0
 protected abstract string GetConnectionString(DatabaseAccessToken accessToken);
Esempio n. 6
0
 public SybaseDatabase(DatabaseAccessToken accessToken)
     : base(accessToken)
 {
 }