Exemplo n.º 1
0
 public SqlConnection GetOrCreateConnection(enmdb_EXDBApplUser theDB)
 {
     try
     {
         int intDBIndex = (int)theDB;
         if (sqcnArr[intDBIndex] == null)
         {
             sqcnArr[intDBIndex] = new SqlConnection(DBGetConnectionStr(theDB));
             sqcnArr[intDBIndex].Open();
         }
         return(sqcnArr[intDBIndex]);
     }
     catch (Exception exc)
     {
         EXException.ThrowEXException("Πρόβλημα στην δημιουργία σύνδεσης με την Βάση Δεδομένων.\n[EX-{FD48C6FC-5193-4392-9560-08D9FB7760F6}]", exc);
         return(null);                //never gets here
     }
 }
Exemplo n.º 2
0
 public SqlConnection GetOrCreateConnection(enmdb_EXDBApplUser theDB)
 {
     try
     {
         int intDBIndex = (int)theDB;
         if (sqcnArr[intDBIndex]==null)
         {
             sqcnArr[intDBIndex]=new SqlConnection(DBGetConnectionStr(theDB));
             sqcnArr[intDBIndex].Open();
         }
         return sqcnArr[intDBIndex];
     }
     catch (Exception exc)
     {
         EXException.ThrowEXException("Πρόβλημα στην δημιουργία σύνδεσης με την Βάση Δεδομένων.\n[EX-{FD48C6FC-5193-4392-9560-08D9FB7760F6}]",exc);
         return null; //never gets here
     }
 }
Exemplo n.º 3
0
        public static SqlCommand DBStoredProcPrepare(enmdb_EXDBApplUser theDB, string strStoredProcName, 
			string[] strArrParametersNames, 
			object[] objArrParametersValues)
        {
            return DBStoredProcPrepare(Instance.GetOrCreateConnection(theDB),strStoredProcName,strArrParametersNames, objArrParametersValues);
        }
Exemplo n.º 4
0
        public static DataSet DBStoredProcExecDataSet(	enmdb_EXDBApplUser theDB, string strStoredProcName, 
			string[] strArrParametersNames, 
			object[] objArrParametersValues)
        {
            return DBStoredProcExecDataSet(Instance.GetOrCreateConnection(theDB),strStoredProcName,strArrParametersNames,objArrParametersValues);
        }
Exemplo n.º 5
0
 public static string DBGetConnectionStr(enmdb_EXDBApplUser theDB)
 {
     //dummy
     return string.Empty;
 }
Exemplo n.º 6
0
 public static DataSet DBExecuteQuery(enmdb_EXDBApplUser theDB,string strQuery)
 {
     return DBExecuteQuery(Instance.GetOrCreateConnection(theDB), strQuery);
 }
Exemplo n.º 7
0
 public static SqlCommand DBStoredProcPrepare(enmdb_EXDBApplUser theDB, string strStoredProcName,
                                              string[] strArrParametersNames,
                                              object[] objArrParametersValues)
 {
     return(DBStoredProcPrepare(Instance.GetOrCreateConnection(theDB), strStoredProcName, strArrParametersNames, objArrParametersValues));
 }
Exemplo n.º 8
0
        private SqlConnection[] sqcnArr = new SqlConnection[] { null, null, null, null, null };  // osa einai sto enum

        public static string DBGetConnectionStr(enmdb_EXDBApplUser theDB)
        {
            //dummy
            return(string.Empty);
        }
Exemplo n.º 9
0
 public static DataSet DBStoredProcExecDataSet(enmdb_EXDBApplUser theDB, string strStoredProcName,
                                               string[] strArrParametersNames,
                                               object[] objArrParametersValues)
 {
     return(DBStoredProcExecDataSet(Instance.GetOrCreateConnection(theDB), strStoredProcName, strArrParametersNames, objArrParametersValues));
 }
Exemplo n.º 10
0
 public static DataSet DBExecuteQuery(enmdb_EXDBApplUser theDB, string strQuery)
 {
     return(DBExecuteQuery(Instance.GetOrCreateConnection(theDB), strQuery));
 }