Example #1
0
 public DbBulkCopierX(Common.ConnectionType connectionType, string connectionString, string tableName, params string[] columnNames)
 {
     ConnectionType   = connectionType;
     ConnectionString = connectionString;
     TableName        = tableName;
     ColumnNames      = columnNames;
 }
Example #2
0
        public static BulkCopy GetBulkCopy(Common.ConnectionType connectionType, string connectionString)
        {
            switch (connectionType)
            {
            case Common.ConnectionType.SqlServer: return(new SqlBulkCopy(connectionString));

            case Common.ConnectionType.Oracle: return(new OracleBulkCopy(connectionString));

            default: throw new ArgumentException("Unsupported ConnectionType: " + connectionType);
            }
        }
Example #3
0
        public DataHandler(Common.ConnectionType connctionType)
        {
            string connection = string.Empty;

            if (connctionType == Common.ConnectionType.Ascend)
            {
                connection    = ConfigurationManager.ConnectionStrings["Ascend"].ConnectionString;
                objConnection = new SqlConnection(connection);
            }
            else
            {
                connection    = ConfigurationManager.ConnectionStrings["MarineDelivery"].ConnectionString;
                objConnection = new SqlConnection(connection);
            }
        }