Ejemplo n.º 1
0
        public PriKey_CountryCodes_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };


            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@CountryCodeID", typeof(string), true, false, DbType.String, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("CountryCodeID", typeof(string), false)
            {
                Updateable = true,
                IsUnique   = true,
                IsKey      = true
            });

            schema_array.Add(new VenturaSqlColumn("Name", typeof(string), false)
            {
                Updateable = true
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[CountryCodes]";
        }
        public PriKey_Sales_PersonCreditCard_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [BusinessEntityID],[CreditCardID],[ModifiedDate]" + CRLF +
                         @"FROM [Sales].[PersonCreditCard]" + CRLF +
                         @"WHERE [BusinessEntityID] = @BusinessEntityID" + CRLF +
                         @"AND [CreditCardID] = @CreditCardID";

            _inputparametervalues = new object[2];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@BusinessEntityID", typeof(int), true, false, DbType.Int32, null, null, null);
            param_array.AddParameterColumn("@CreditCardID", typeof(int), true, false, DbType.Int32, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("BusinessEntityID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                BaseSchemaName   = "Sales",
                BaseTableName    = "PersonCreditCard",
                BaseColumnName   = "BusinessEntityID"
            });

            schema_array.Add(new VenturaSqlColumn("CreditCardID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                BaseSchemaName   = "Sales",
                BaseTableName    = "PersonCreditCard",
                BaseColumnName   = "CreditCardID"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Sales",
                BaseTableName    = "PersonCreditCard",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Sales].[PersonCreditCard]";
        }
Ejemplo n.º 3
0
        public PriKey_Sales_CountryRegionCurrency_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [CountryRegionCode],[CurrencyCode],[ModifiedDate]" + CRLF +
                         @"FROM [Sales].[CountryRegionCurrency]" + CRLF +
                         @"WHERE [CountryRegionCode] = @CountryRegionCode" + CRLF +
                         @"AND [CurrencyCode] = @CurrencyCode";

            _inputparametervalues = new object[2];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@CountryRegionCode", typeof(string), true, false, DbType.String, null, null, null);
            param_array.AddParameterColumn("@CurrencyCode", typeof(string), true, false, DbType.String, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("CountryRegionCode", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 3,
                ProviderType   = 12,
                IsKey          = true,
                BaseSchemaName = "Sales",
                BaseTableName  = "CountryRegionCurrency",
                BaseColumnName = "CountryRegionCode"
            });

            schema_array.Add(new VenturaSqlColumn("CurrencyCode", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 3,
                ProviderType   = 10,
                IsKey          = true,
                BaseSchemaName = "Sales",
                BaseTableName  = "CountryRegionCurrency",
                BaseColumnName = "CurrencyCode"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Sales",
                BaseTableName    = "CountryRegionCurrency",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Sales].[CountryRegionCurrency]";
        }
        public PriKey_Production_Illustration_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [IllustrationID],[Diagram],[ModifiedDate]" + CRLF +
                         @"FROM [Production].[Illustration]" + CRLF +
                         @"WHERE [IllustrationID] = @IllustrationID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@IllustrationID", typeof(int), true, false, DbType.Int32, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("IllustrationID", typeof(int), false)
            {
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                IsIdentity       = true,
                IsAutoIncrement  = true,
                BaseSchemaName   = "Production",
                BaseTableName    = "Illustration",
                BaseColumnName   = "IllustrationID"
            });

            schema_array.Add(new VenturaSqlColumn("Diagram", typeof(string), true)
            {
                Updateable     = true,
                ProviderType   = 25,
                IsLong         = true,
                BaseSchemaName = "Production",
                BaseTableName  = "Illustration",
                BaseColumnName = "Diagram"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Production",
                BaseTableName    = "Illustration",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Production].[Illustration]";
        }
        public PriKey_Person_BusinessEntity_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [BusinessEntityID],[rowguid],[ModifiedDate]" + CRLF +
                         @"FROM [Person].[BusinessEntity]" + CRLF +
                         @"WHERE [BusinessEntityID] = @BusinessEntityID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@BusinessEntityID", typeof(int), true, false, DbType.Int32, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("BusinessEntityID", typeof(int), false)
            {
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                IsIdentity       = true,
                IsAutoIncrement  = true,
                BaseSchemaName   = "Person",
                BaseTableName    = "BusinessEntity",
                BaseColumnName   = "BusinessEntityID"
            });

            schema_array.Add(new VenturaSqlColumn("rowguid", typeof(Guid), false)
            {
                Updateable     = true,
                ColumnSize     = 16,
                ProviderType   = 14,
                BaseSchemaName = "Person",
                BaseTableName  = "BusinessEntity",
                BaseColumnName = "rowguid"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Person",
                BaseTableName    = "BusinessEntity",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Person].[BusinessEntity]";
        }
Ejemplo n.º 6
0
        public PriKey_Production_Culture_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [CultureID],[Name],[ModifiedDate]" + CRLF +
                         @"FROM [Production].[Culture]" + CRLF +
                         @"WHERE [CultureID] = @CultureID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@CultureID", typeof(string), true, false, DbType.String, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("CultureID", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 6,
                ProviderType   = 10,
                IsKey          = true,
                BaseSchemaName = "Production",
                BaseTableName  = "Culture",
                BaseColumnName = "CultureID"
            });

            schema_array.Add(new VenturaSqlColumn("Name", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 50,
                ProviderType   = 12,
                BaseSchemaName = "Production",
                BaseTableName  = "Culture",
                BaseColumnName = "Name"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Production",
                BaseTableName    = "Culture",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Production].[Culture]";
        }
Ejemplo n.º 7
0
        public PriKey_TaxTypes_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [TaxTypeID],[Name],[Rate]" + CRLF +
                         @"FROM [TaxTypes]" + CRLF +
                         @"WHERE [TaxTypeID] = @TaxTypeID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@TaxTypeID", typeof(long), true, false, DbType.Int64, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("TaxTypeID", typeof(long), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 19,
                NumericScale     = 0,
                ProviderType     = 12,
                IsUnique         = true,
                IsKey            = true,
                BaseCatalogName  = "main",
                BaseTableName    = "TaxTypes",
                BaseColumnName   = "TaxTypeID"
            });

            schema_array.Add(new VenturaSqlColumn("Name", typeof(string), false)
            {
                Updateable      = true,
                ProviderType    = 16,
                BaseCatalogName = "main",
                BaseTableName   = "TaxTypes",
                BaseColumnName  = "Name"
            });

            schema_array.Add(new VenturaSqlColumn("Rate", typeof(string), false)
            {
                Updateable      = true,
                ProviderType    = 16,
                BaseCatalogName = "main",
                BaseTableName   = "TaxTypes",
                BaseColumnName  = "Rate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[TaxTypes]";
        }
Ejemplo n.º 8
0
        public PriKey_Categories_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };


            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@CategoryID", typeof(long), true, false, DbType.Int64, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("CategoryID", typeof(long), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 19,
                NumericScale     = 0,
                IsUnique         = true,
                IsKey            = true
            });

            schema_array.Add(new VenturaSqlColumn("Description", typeof(string), true)
            {
                Updateable = true
            });

            schema_array.Add(new VenturaSqlColumn("Name", typeof(string), false)
            {
                Updateable = true
            });

            schema_array.Add(new VenturaSqlColumn("Picture", typeof(byte[]), true)
            {
                Updateable = true
            });

            schema_array.Add(new VenturaSqlColumn("Thumbnail", typeof(byte[]), true)
            {
                Updateable = true
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Categories]";
        }
Ejemplo n.º 9
0
        public PriKey_CountryCodes_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [CountryCodeID],[Name]" + CRLF +
                         @"FROM [CountryCodes]" + CRLF +
                         @"WHERE [CountryCodeID] = @CountryCodeID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@CountryCodeID", typeof(string), true, false, DbType.String, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("CountryCodeID", typeof(string), false)
            {
                Updateable      = true,
                ProviderType    = 16,
                IsUnique        = true,
                IsKey           = true,
                BaseCatalogName = "main",
                BaseTableName   = "CountryCodes",
                BaseColumnName  = "CountryCodeID"
            });

            schema_array.Add(new VenturaSqlColumn("Name", typeof(string), false)
            {
                Updateable      = true,
                ProviderType    = 16,
                BaseCatalogName = "main",
                BaseTableName   = "CountryCodes",
                BaseColumnName  = "Name"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[CountryCodes]";
        }
Ejemplo n.º 10
0
        public PriKey_Production_BillOfMaterials_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [BillOfMaterialsID],[ProductAssemblyID],[ComponentID],[StartDate],[EndDate],[UnitMeasureCode],[BOMLevel],[PerAssemblyQty],[ModifiedDate]" + CRLF +
                         @"FROM [Production].[BillOfMaterials]" + CRLF +
                         @"WHERE [ProductAssemblyID] = @ProductAssemblyID" + CRLF +
                         @"AND [ComponentID] = @ComponentID" + CRLF +
                         @"AND [StartDate] = @StartDate";

            _inputparametervalues = new object[3];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@ProductAssemblyID", typeof(int), true, false, DbType.Int32, null, null, null);
            param_array.AddParameterColumn("@ComponentID", typeof(int), true, false, DbType.Int32, null, null, null);
            param_array.AddParameterColumn("@StartDate", typeof(DateTime), true, false, DbType.DateTime, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("BillOfMaterialsID", typeof(int), false)
            {
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsIdentity       = true,
                IsAutoIncrement  = true,
                BaseSchemaName   = "Production",
                BaseTableName    = "BillOfMaterials",
                BaseColumnName   = "BillOfMaterialsID"
            });

            schema_array.Add(new VenturaSqlColumn("ProductAssemblyID", typeof(int), true)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                BaseSchemaName   = "Production",
                BaseTableName    = "BillOfMaterials",
                BaseColumnName   = "ProductAssemblyID"
            });

            schema_array.Add(new VenturaSqlColumn("ComponentID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                BaseSchemaName   = "Production",
                BaseTableName    = "BillOfMaterials",
                BaseColumnName   = "ComponentID"
            });

            schema_array.Add(new VenturaSqlColumn("StartDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                IsKey            = true,
                BaseSchemaName   = "Production",
                BaseTableName    = "BillOfMaterials",
                BaseColumnName   = "StartDate"
            });

            schema_array.Add(new VenturaSqlColumn("EndDate", typeof(DateTime), true)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Production",
                BaseTableName    = "BillOfMaterials",
                BaseColumnName   = "EndDate"
            });

            schema_array.Add(new VenturaSqlColumn("UnitMeasureCode", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 3,
                ProviderType   = 10,
                BaseSchemaName = "Production",
                BaseTableName  = "BillOfMaterials",
                BaseColumnName = "UnitMeasureCode"
            });

            schema_array.Add(new VenturaSqlColumn("BOMLevel", typeof(short), false)
            {
                Updateable       = true,
                ColumnSize       = 2,
                NumericPrecision = 5,
                ProviderType     = 16,
                BaseSchemaName   = "Production",
                BaseTableName    = "BillOfMaterials",
                BaseColumnName   = "BOMLevel"
            });

            schema_array.Add(new VenturaSqlColumn("PerAssemblyQty", typeof(decimal), false)
            {
                Updateable       = true,
                ColumnSize       = 17,
                NumericPrecision = 8,
                NumericScale     = 2,
                ProviderType     = 5,
                BaseSchemaName   = "Production",
                BaseTableName    = "BillOfMaterials",
                BaseColumnName   = "PerAssemblyQty"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Production",
                BaseTableName    = "BillOfMaterials",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Production].[BillOfMaterials]";
        }
Ejemplo n.º 11
0
        public PriKey_Production_WorkOrder_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [WorkOrderID],[ProductID],[OrderQty],[StockedQty],[ScrappedQty],[StartDate],[EndDate],[DueDate],[ScrapReasonID],[ModifiedDate]" + CRLF +
                         @"FROM [Production].[WorkOrder]" + CRLF +
                         @"WHERE [WorkOrderID] = @WorkOrderID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@WorkOrderID", typeof(int), true, false, DbType.Int32, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("WorkOrderID", typeof(int), false)
            {
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                IsIdentity       = true,
                IsAutoIncrement  = true,
                BaseSchemaName   = "Production",
                BaseTableName    = "WorkOrder",
                BaseColumnName   = "WorkOrderID"
            });

            schema_array.Add(new VenturaSqlColumn("ProductID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                BaseSchemaName   = "Production",
                BaseTableName    = "WorkOrder",
                BaseColumnName   = "ProductID"
            });

            schema_array.Add(new VenturaSqlColumn("OrderQty", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                BaseSchemaName   = "Production",
                BaseTableName    = "WorkOrder",
                BaseColumnName   = "OrderQty"
            });

            schema_array.Add(new VenturaSqlColumn("StockedQty", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                BaseSchemaName   = "Production",
                BaseTableName    = "WorkOrder",
                BaseColumnName   = "StockedQty"
            });

            schema_array.Add(new VenturaSqlColumn("ScrappedQty", typeof(short), false)
            {
                Updateable       = true,
                ColumnSize       = 2,
                NumericPrecision = 5,
                ProviderType     = 16,
                BaseSchemaName   = "Production",
                BaseTableName    = "WorkOrder",
                BaseColumnName   = "ScrappedQty"
            });

            schema_array.Add(new VenturaSqlColumn("StartDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Production",
                BaseTableName    = "WorkOrder",
                BaseColumnName   = "StartDate"
            });

            schema_array.Add(new VenturaSqlColumn("EndDate", typeof(DateTime), true)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Production",
                BaseTableName    = "WorkOrder",
                BaseColumnName   = "EndDate"
            });

            schema_array.Add(new VenturaSqlColumn("DueDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Production",
                BaseTableName    = "WorkOrder",
                BaseColumnName   = "DueDate"
            });

            schema_array.Add(new VenturaSqlColumn("ScrapReasonID", typeof(short), true)
            {
                Updateable       = true,
                ColumnSize       = 2,
                NumericPrecision = 5,
                ProviderType     = 16,
                BaseSchemaName   = "Production",
                BaseTableName    = "WorkOrder",
                BaseColumnName   = "ScrapReasonID"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Production",
                BaseTableName    = "WorkOrder",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Production].[WorkOrder]";
        }
Ejemplo n.º 12
0
        public PriKey_Production_ProductProductPhoto_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [ProductID],[ProductPhotoID],[Primary],[ModifiedDate]" + CRLF +
                         @"FROM [Production].[ProductProductPhoto]" + CRLF +
                         @"WHERE [ProductID] = @ProductID" + CRLF +
                         @"AND [ProductPhotoID] = @ProductPhotoID";

            _inputparametervalues = new object[2];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@ProductID", typeof(int), true, false, DbType.Int32, null, null, null);
            param_array.AddParameterColumn("@ProductPhotoID", typeof(int), true, false, DbType.Int32, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("ProductID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                BaseSchemaName   = "Production",
                BaseTableName    = "ProductProductPhoto",
                BaseColumnName   = "ProductID"
            });

            schema_array.Add(new VenturaSqlColumn("ProductPhotoID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                BaseSchemaName   = "Production",
                BaseTableName    = "ProductProductPhoto",
                BaseColumnName   = "ProductPhotoID"
            });

            schema_array.Add(new VenturaSqlColumn("Primary", typeof(bool), false)
            {
                Updateable     = true,
                ColumnSize     = 1,
                ProviderType   = 2,
                BaseSchemaName = "Production",
                BaseTableName  = "ProductProductPhoto",
                BaseColumnName = "Primary"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Production",
                BaseTableName    = "ProductProductPhoto",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Production].[ProductProductPhoto]";
        }
        public PriKey_Person_Address_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [AddressID],[AddressLine1],[AddressLine2],[City],[StateProvinceID],[PostalCode],[SpatialLocation],[rowguid],[ModifiedDate]" + CRLF +
                         @"FROM [Person].[Address]" + CRLF +
                         @"WHERE [AddressID] = @AddressID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@AddressID", typeof(int), true, false, DbType.Int32, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("AddressID", typeof(int), false)
            {
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                IsIdentity       = true,
                IsAutoIncrement  = true,
                BaseSchemaName   = "Person",
                BaseTableName    = "Address",
                BaseColumnName   = "AddressID"
            });

            schema_array.Add(new VenturaSqlColumn("AddressLine1", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 60,
                ProviderType   = 12,
                BaseSchemaName = "Person",
                BaseTableName  = "Address",
                BaseColumnName = "AddressLine1"
            });

            schema_array.Add(new VenturaSqlColumn("AddressLine2", typeof(string), true)
            {
                Updateable     = true,
                ColumnSize     = 60,
                ProviderType   = 12,
                BaseSchemaName = "Person",
                BaseTableName  = "Address",
                BaseColumnName = "AddressLine2"
            });

            schema_array.Add(new VenturaSqlColumn("City", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 30,
                ProviderType   = 12,
                BaseSchemaName = "Person",
                BaseTableName  = "Address",
                BaseColumnName = "City"
            });

            schema_array.Add(new VenturaSqlColumn("StateProvinceID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                BaseSchemaName   = "Person",
                BaseTableName    = "Address",
                BaseColumnName   = "StateProvinceID"
            });

            schema_array.Add(new VenturaSqlColumn("PostalCode", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 15,
                ProviderType   = 12,
                BaseSchemaName = "Person",
                BaseTableName  = "Address",
                BaseColumnName = "PostalCode"
            });

            schema_array.Add(new VenturaSqlColumn("SpatialLocation", typeof(object), true)
            {
                Updateable               = true,
                ProviderType             = 29,
                IsLong                   = true,
                UdtAssemblyQualifiedName = "Microsoft.SqlServer.Types.SqlGeography, Microsoft.SqlServer.Types, Version=11.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91",
                BaseSchemaName           = "Person",
                BaseTableName            = "Address",
                BaseColumnName           = "SpatialLocation"
            });

            schema_array.Add(new VenturaSqlColumn("rowguid", typeof(Guid), false)
            {
                Updateable     = true,
                ColumnSize     = 16,
                ProviderType   = 14,
                BaseSchemaName = "Person",
                BaseTableName  = "Address",
                BaseColumnName = "rowguid"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Person",
                BaseTableName    = "Address",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Person].[Address]";
        }
Ejemplo n.º 14
0
        public PriKey_HumanResources_Department_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [DepartmentID],[Name],[GroupName],[ModifiedDate]" + CRLF +
                         @"FROM [HumanResources].[Department]" + CRLF +
                         @"WHERE [DepartmentID] = @DepartmentID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@DepartmentID", typeof(short), true, false, DbType.Int16, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("DepartmentID", typeof(short), false)
            {
                ColumnSize       = 2,
                NumericPrecision = 5,
                ProviderType     = 16,
                IsKey            = true,
                IsIdentity       = true,
                IsAutoIncrement  = true,
                BaseSchemaName   = "HumanResources",
                BaseTableName    = "Department",
                BaseColumnName   = "DepartmentID"
            });

            schema_array.Add(new VenturaSqlColumn("Name", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 50,
                ProviderType   = 12,
                BaseSchemaName = "HumanResources",
                BaseTableName  = "Department",
                BaseColumnName = "Name"
            });

            schema_array.Add(new VenturaSqlColumn("GroupName", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 50,
                ProviderType   = 12,
                BaseSchemaName = "HumanResources",
                BaseTableName  = "Department",
                BaseColumnName = "GroupName"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "HumanResources",
                BaseTableName    = "Department",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[HumanResources].[Department]";
        }
Ejemplo n.º 15
0
        public PriKey_Sales_SalesTerritory_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [TerritoryID],[Name],[CountryRegionCode],[Group],[SalesYTD],[SalesLastYear],[CostYTD],[CostLastYear],[rowguid],[ModifiedDate]" + CRLF +
                         @"FROM [Sales].[SalesTerritory]" + CRLF +
                         @"WHERE [TerritoryID] = @TerritoryID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@TerritoryID", typeof(int), true, false, DbType.Int32, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("TerritoryID", typeof(int), false)
            {
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                IsIdentity       = true,
                IsAutoIncrement  = true,
                BaseSchemaName   = "Sales",
                BaseTableName    = "SalesTerritory",
                BaseColumnName   = "TerritoryID"
            });

            schema_array.Add(new VenturaSqlColumn("Name", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 50,
                ProviderType   = 12,
                BaseSchemaName = "Sales",
                BaseTableName  = "SalesTerritory",
                BaseColumnName = "Name"
            });

            schema_array.Add(new VenturaSqlColumn("CountryRegionCode", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 3,
                ProviderType   = 12,
                BaseSchemaName = "Sales",
                BaseTableName  = "SalesTerritory",
                BaseColumnName = "CountryRegionCode"
            });

            schema_array.Add(new VenturaSqlColumn("Group", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 50,
                ProviderType   = 12,
                BaseSchemaName = "Sales",
                BaseTableName  = "SalesTerritory",
                BaseColumnName = "Group"
            });

            schema_array.Add(new VenturaSqlColumn("SalesYTD", typeof(decimal), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 19,
                ProviderType     = 9,
                BaseSchemaName   = "Sales",
                BaseTableName    = "SalesTerritory",
                BaseColumnName   = "SalesYTD"
            });

            schema_array.Add(new VenturaSqlColumn("SalesLastYear", typeof(decimal), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 19,
                ProviderType     = 9,
                BaseSchemaName   = "Sales",
                BaseTableName    = "SalesTerritory",
                BaseColumnName   = "SalesLastYear"
            });

            schema_array.Add(new VenturaSqlColumn("CostYTD", typeof(decimal), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 19,
                ProviderType     = 9,
                BaseSchemaName   = "Sales",
                BaseTableName    = "SalesTerritory",
                BaseColumnName   = "CostYTD"
            });

            schema_array.Add(new VenturaSqlColumn("CostLastYear", typeof(decimal), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 19,
                ProviderType     = 9,
                BaseSchemaName   = "Sales",
                BaseTableName    = "SalesTerritory",
                BaseColumnName   = "CostLastYear"
            });

            schema_array.Add(new VenturaSqlColumn("rowguid", typeof(Guid), false)
            {
                Updateable     = true,
                ColumnSize     = 16,
                ProviderType   = 14,
                BaseSchemaName = "Sales",
                BaseTableName  = "SalesTerritory",
                BaseColumnName = "rowguid"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Sales",
                BaseTableName    = "SalesTerritory",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Sales].[SalesTerritory]";
        }
        public PriKey_Sales_CreditCard_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [CreditCardID],[CardType],[CardNumber],[ExpMonth],[ExpYear],[ModifiedDate]" + CRLF +
                         @"FROM [Sales].[CreditCard]" + CRLF +
                         @"WHERE [CreditCardID] = @CreditCardID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@CreditCardID", typeof(int), true, false, DbType.Int32, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("CreditCardID", typeof(int), false)
            {
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                IsIdentity       = true,
                IsAutoIncrement  = true,
                BaseSchemaName   = "Sales",
                BaseTableName    = "CreditCard",
                BaseColumnName   = "CreditCardID"
            });

            schema_array.Add(new VenturaSqlColumn("CardType", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 50,
                ProviderType   = 12,
                BaseSchemaName = "Sales",
                BaseTableName  = "CreditCard",
                BaseColumnName = "CardType"
            });

            schema_array.Add(new VenturaSqlColumn("CardNumber", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 25,
                ProviderType   = 12,
                BaseSchemaName = "Sales",
                BaseTableName  = "CreditCard",
                BaseColumnName = "CardNumber"
            });

            schema_array.Add(new VenturaSqlColumn("ExpMonth", typeof(byte), false)
            {
                Updateable       = true,
                ColumnSize       = 1,
                NumericPrecision = 3,
                ProviderType     = 20,
                BaseSchemaName   = "Sales",
                BaseTableName    = "CreditCard",
                BaseColumnName   = "ExpMonth"
            });

            schema_array.Add(new VenturaSqlColumn("ExpYear", typeof(short), false)
            {
                Updateable       = true,
                ColumnSize       = 2,
                NumericPrecision = 5,
                ProviderType     = 16,
                BaseSchemaName   = "Sales",
                BaseTableName    = "CreditCard",
                BaseColumnName   = "ExpYear"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Sales",
                BaseTableName    = "CreditCard",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Sales].[CreditCard]";
        }
Ejemplo n.º 17
0
        public PriKey_Purchasing_Vendor_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [BusinessEntityID],[AccountNumber],[Name],[CreditRating],[PreferredVendorStatus],[ActiveFlag],[PurchasingWebServiceURL],[ModifiedDate]" + CRLF +
                         @"FROM [Purchasing].[Vendor]" + CRLF +
                         @"WHERE [BusinessEntityID] = @BusinessEntityID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@BusinessEntityID", typeof(int), true, false, DbType.Int32, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("BusinessEntityID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                BaseSchemaName   = "Purchasing",
                BaseTableName    = "Vendor",
                BaseColumnName   = "BusinessEntityID"
            });

            schema_array.Add(new VenturaSqlColumn("AccountNumber", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 15,
                ProviderType   = 12,
                BaseSchemaName = "Purchasing",
                BaseTableName  = "Vendor",
                BaseColumnName = "AccountNumber"
            });

            schema_array.Add(new VenturaSqlColumn("Name", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 50,
                ProviderType   = 12,
                BaseSchemaName = "Purchasing",
                BaseTableName  = "Vendor",
                BaseColumnName = "Name"
            });

            schema_array.Add(new VenturaSqlColumn("CreditRating", typeof(byte), false)
            {
                Updateable       = true,
                ColumnSize       = 1,
                NumericPrecision = 3,
                ProviderType     = 20,
                BaseSchemaName   = "Purchasing",
                BaseTableName    = "Vendor",
                BaseColumnName   = "CreditRating"
            });

            schema_array.Add(new VenturaSqlColumn("PreferredVendorStatus", typeof(bool), false)
            {
                Updateable     = true,
                ColumnSize     = 1,
                ProviderType   = 2,
                BaseSchemaName = "Purchasing",
                BaseTableName  = "Vendor",
                BaseColumnName = "PreferredVendorStatus"
            });

            schema_array.Add(new VenturaSqlColumn("ActiveFlag", typeof(bool), false)
            {
                Updateable     = true,
                ColumnSize     = 1,
                ProviderType   = 2,
                BaseSchemaName = "Purchasing",
                BaseTableName  = "Vendor",
                BaseColumnName = "ActiveFlag"
            });

            schema_array.Add(new VenturaSqlColumn("PurchasingWebServiceURL", typeof(string), true)
            {
                Updateable     = true,
                ColumnSize     = 1024,
                ProviderType   = 12,
                BaseSchemaName = "Purchasing",
                BaseTableName  = "Vendor",
                BaseColumnName = "PurchasingWebServiceURL"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Purchasing",
                BaseTableName    = "Vendor",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Purchasing].[Vendor]";
        }
Ejemplo n.º 18
0
        public PriKey_Person_StateProvince_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [StateProvinceID],[StateProvinceCode],[CountryRegionCode],[IsOnlyStateProvinceFlag],[Name],[TerritoryID],[rowguid],[ModifiedDate]" + CRLF +
                         @"FROM [Person].[StateProvince]" + CRLF +
                         @"WHERE [StateProvinceID] = @StateProvinceID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@StateProvinceID", typeof(int), true, false, DbType.Int32, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("StateProvinceID", typeof(int), false)
            {
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                IsIdentity       = true,
                IsAutoIncrement  = true,
                BaseSchemaName   = "Person",
                BaseTableName    = "StateProvince",
                BaseColumnName   = "StateProvinceID"
            });

            schema_array.Add(new VenturaSqlColumn("StateProvinceCode", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 3,
                ProviderType   = 10,
                BaseSchemaName = "Person",
                BaseTableName  = "StateProvince",
                BaseColumnName = "StateProvinceCode"
            });

            schema_array.Add(new VenturaSqlColumn("CountryRegionCode", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 3,
                ProviderType   = 12,
                BaseSchemaName = "Person",
                BaseTableName  = "StateProvince",
                BaseColumnName = "CountryRegionCode"
            });

            schema_array.Add(new VenturaSqlColumn("IsOnlyStateProvinceFlag", typeof(bool), false)
            {
                Updateable     = true,
                ColumnSize     = 1,
                ProviderType   = 2,
                BaseSchemaName = "Person",
                BaseTableName  = "StateProvince",
                BaseColumnName = "IsOnlyStateProvinceFlag"
            });

            schema_array.Add(new VenturaSqlColumn("Name", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 50,
                ProviderType   = 12,
                BaseSchemaName = "Person",
                BaseTableName  = "StateProvince",
                BaseColumnName = "Name"
            });

            schema_array.Add(new VenturaSqlColumn("TerritoryID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                BaseSchemaName   = "Person",
                BaseTableName    = "StateProvince",
                BaseColumnName   = "TerritoryID"
            });

            schema_array.Add(new VenturaSqlColumn("rowguid", typeof(Guid), false)
            {
                Updateable     = true,
                ColumnSize     = 16,
                ProviderType   = 14,
                BaseSchemaName = "Person",
                BaseTableName  = "StateProvince",
                BaseColumnName = "rowguid"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Person",
                BaseTableName    = "StateProvince",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Person].[StateProvince]";
        }
        public PriKey_Production_ProductReview_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [ProductReviewID],[ProductID],[ReviewerName],[ReviewDate],[EmailAddress],[Rating],[Comments],[ModifiedDate]" + CRLF +
                         @"FROM [Production].[ProductReview]" + CRLF +
                         @"WHERE [ProductReviewID] = @ProductReviewID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@ProductReviewID", typeof(int), true, false, DbType.Int32, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("ProductReviewID", typeof(int), false)
            {
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                IsIdentity       = true,
                IsAutoIncrement  = true,
                BaseSchemaName   = "Production",
                BaseTableName    = "ProductReview",
                BaseColumnName   = "ProductReviewID"
            });

            schema_array.Add(new VenturaSqlColumn("ProductID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                BaseSchemaName   = "Production",
                BaseTableName    = "ProductReview",
                BaseColumnName   = "ProductID"
            });

            schema_array.Add(new VenturaSqlColumn("ReviewerName", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 50,
                ProviderType   = 12,
                BaseSchemaName = "Production",
                BaseTableName  = "ProductReview",
                BaseColumnName = "ReviewerName"
            });

            schema_array.Add(new VenturaSqlColumn("ReviewDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Production",
                BaseTableName    = "ProductReview",
                BaseColumnName   = "ReviewDate"
            });

            schema_array.Add(new VenturaSqlColumn("EmailAddress", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 50,
                ProviderType   = 12,
                BaseSchemaName = "Production",
                BaseTableName  = "ProductReview",
                BaseColumnName = "EmailAddress"
            });

            schema_array.Add(new VenturaSqlColumn("Rating", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                BaseSchemaName   = "Production",
                BaseTableName    = "ProductReview",
                BaseColumnName   = "Rating"
            });

            schema_array.Add(new VenturaSqlColumn("Comments", typeof(string), true)
            {
                Updateable     = true,
                ColumnSize     = 3850,
                ProviderType   = 12,
                BaseSchemaName = "Production",
                BaseTableName  = "ProductReview",
                BaseColumnName = "Comments"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Production",
                BaseTableName    = "ProductReview",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Production].[ProductReview]";
        }
        public PriKey_Production_ProductModel_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [ProductModelID],[Name],[CatalogDescription],[Instructions],[rowguid],[ModifiedDate]" + CRLF +
                         @"FROM [Production].[ProductModel]" + CRLF +
                         @"WHERE [ProductModelID] = @ProductModelID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@ProductModelID", typeof(int), true, false, DbType.Int32, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("ProductModelID", typeof(int), false)
            {
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                IsIdentity       = true,
                IsAutoIncrement  = true,
                BaseSchemaName   = "Production",
                BaseTableName    = "ProductModel",
                BaseColumnName   = "ProductModelID"
            });

            schema_array.Add(new VenturaSqlColumn("Name", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 50,
                ProviderType   = 12,
                BaseSchemaName = "Production",
                BaseTableName  = "ProductModel",
                BaseColumnName = "Name"
            });

            schema_array.Add(new VenturaSqlColumn("CatalogDescription", typeof(string), true)
            {
                Updateable   = true,
                ProviderType = 25,
                IsLong       = true,
                XmlSchemaCollectionDatabase     = "AdventureWorks2017",
                XmlSchemaCollectionOwningSchema = "Production",
                XmlSchemaCollectionName         = "ProductDescriptionSchemaCollection",
                BaseSchemaName = "Production",
                BaseTableName  = "ProductModel",
                BaseColumnName = "CatalogDescription"
            });

            schema_array.Add(new VenturaSqlColumn("Instructions", typeof(string), true)
            {
                Updateable   = true,
                ProviderType = 25,
                IsLong       = true,
                XmlSchemaCollectionDatabase     = "AdventureWorks2017",
                XmlSchemaCollectionOwningSchema = "Production",
                XmlSchemaCollectionName         = "ManuInstructionsSchemaCollection",
                BaseSchemaName = "Production",
                BaseTableName  = "ProductModel",
                BaseColumnName = "Instructions"
            });

            schema_array.Add(new VenturaSqlColumn("rowguid", typeof(Guid), false)
            {
                Updateable     = true,
                ColumnSize     = 16,
                ProviderType   = 14,
                BaseSchemaName = "Production",
                BaseTableName  = "ProductModel",
                BaseColumnName = "rowguid"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Production",
                BaseTableName    = "ProductModel",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Production].[ProductModel]";
        }
        public PriKey_HumanResources_JobCandidate_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [JobCandidateID],[BusinessEntityID],[Resume],[ModifiedDate]" + CRLF +
                         @"FROM [HumanResources].[JobCandidate]" + CRLF +
                         @"WHERE [JobCandidateID] = @JobCandidateID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@JobCandidateID", typeof(int), true, false, DbType.Int32, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("JobCandidateID", typeof(int), false)
            {
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                IsIdentity       = true,
                IsAutoIncrement  = true,
                BaseSchemaName   = "HumanResources",
                BaseTableName    = "JobCandidate",
                BaseColumnName   = "JobCandidateID"
            });

            schema_array.Add(new VenturaSqlColumn("BusinessEntityID", typeof(int), true)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                BaseSchemaName   = "HumanResources",
                BaseTableName    = "JobCandidate",
                BaseColumnName   = "BusinessEntityID"
            });

            schema_array.Add(new VenturaSqlColumn("Resume", typeof(string), true)
            {
                Updateable   = true,
                ProviderType = 25,
                IsLong       = true,
                XmlSchemaCollectionDatabase     = "AdventureWorks2017",
                XmlSchemaCollectionOwningSchema = "HumanResources",
                XmlSchemaCollectionName         = "HRResumeSchemaCollection",
                BaseSchemaName = "HumanResources",
                BaseTableName  = "JobCandidate",
                BaseColumnName = "Resume"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "HumanResources",
                BaseTableName    = "JobCandidate",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[HumanResources].[JobCandidate]";
        }
Ejemplo n.º 22
0
        public SingleCustomerRecordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT * FROM Sales.Customer WHERE CustomerID = @CustomerID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@CustomerID", typeof(int), true, false, DbType.Int32, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("CustomerID", typeof(int), false)
            {
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                IsIdentity       = true,
                IsAutoIncrement  = true,
                BaseSchemaName   = "Sales",
                BaseTableName    = "Customer",
                BaseColumnName   = "CustomerID"
            });

            schema_array.Add(new VenturaSqlColumn("PersonID", typeof(int), true)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                BaseSchemaName   = "Sales",
                BaseTableName    = "Customer",
                BaseColumnName   = "PersonID"
            });

            schema_array.Add(new VenturaSqlColumn("StoreID", typeof(int), true)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                BaseSchemaName   = "Sales",
                BaseTableName    = "Customer",
                BaseColumnName   = "StoreID"
            });

            schema_array.Add(new VenturaSqlColumn("TerritoryID", typeof(int), true)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                BaseSchemaName   = "Sales",
                BaseTableName    = "Customer",
                BaseColumnName   = "TerritoryID"
            });

            schema_array.Add(new VenturaSqlColumn("AccountNumber", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 10,
                ProviderType   = 22,
                BaseSchemaName = "Sales",
                BaseTableName  = "Customer",
                BaseColumnName = "AccountNumber"
            });

            schema_array.Add(new VenturaSqlColumn("rowguid", typeof(Guid), false)
            {
                Updateable     = true,
                ColumnSize     = 16,
                ProviderType   = 14,
                BaseSchemaName = "Sales",
                BaseTableName  = "Customer",
                BaseColumnName = "rowguid"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Sales",
                BaseTableName    = "Customer",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Sales].[Customer]";
        }
Ejemplo n.º 23
0
        public ExecStoredProcedureRecordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"EXEC  [dbo].[uspGetBillOfMaterials] @ParamStartProductID, @ParamCheckDate";

            _inputparametervalues = new object[2];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@ParamStartProductID", typeof(int), true, false, DbType.Int32, null, null, null);
            param_array.AddParameterColumn("@ParamCheckDate", typeof(DateTime), true, false, DbType.Date, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("ProductAssemblyID", typeof(int), true)
            {
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsExpression     = true,
                BaseColumnName   = "ProductAssemblyID"
            });

            schema_array.Add(new VenturaSqlColumn("ComponentID", typeof(int), true)
            {
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsExpression     = true,
                BaseColumnName   = "ComponentID"
            });

            schema_array.Add(new VenturaSqlColumn("ComponentDesc", typeof(string), true)
            {
                ColumnSize     = 50,
                ProviderType   = 12,
                IsExpression   = true,
                BaseColumnName = "ComponentDesc"
            });

            schema_array.Add(new VenturaSqlColumn("TotalQuantity", typeof(decimal), true)
            {
                ColumnSize       = 17,
                NumericPrecision = 38,
                NumericScale     = 2,
                ProviderType     = 5,
                IsExpression     = true,
                BaseColumnName   = "TotalQuantity"
            });

            schema_array.Add(new VenturaSqlColumn("StandardCost", typeof(decimal), true)
            {
                ColumnSize       = 8,
                NumericPrecision = 19,
                ProviderType     = 9,
                IsExpression     = true,
                BaseColumnName   = "StandardCost"
            });

            schema_array.Add(new VenturaSqlColumn("ListPrice", typeof(decimal), true)
            {
                ColumnSize       = 8,
                NumericPrecision = 19,
                ProviderType     = 9,
                IsExpression     = true,
                BaseColumnName   = "ListPrice"
            });

            schema_array.Add(new VenturaSqlColumn("BOMLevel", typeof(short), true)
            {
                ColumnSize       = 2,
                NumericPrecision = 5,
                ProviderType     = 16,
                IsExpression     = true,
                BaseColumnName   = "BOMLevel"
            });

            schema_array.Add(new VenturaSqlColumn("RecursionLevel", typeof(int), true)
            {
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsExpression     = true,
                BaseColumnName   = "RecursionLevel"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
        }
Ejemplo n.º 24
0
        public PriKey_HumanResources_EmployeePayHistory_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [BusinessEntityID],[RateChangeDate],[Rate],[PayFrequency],[ModifiedDate]" + CRLF +
                         @"FROM [HumanResources].[EmployeePayHistory]" + CRLF +
                         @"WHERE [BusinessEntityID] = @BusinessEntityID" + CRLF +
                         @"AND [RateChangeDate] = @RateChangeDate";

            _inputparametervalues = new object[2];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@BusinessEntityID", typeof(int), true, false, DbType.Int32, null, null, null);
            param_array.AddParameterColumn("@RateChangeDate", typeof(DateTime), true, false, DbType.DateTime, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("BusinessEntityID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                BaseSchemaName   = "HumanResources",
                BaseTableName    = "EmployeePayHistory",
                BaseColumnName   = "BusinessEntityID"
            });

            schema_array.Add(new VenturaSqlColumn("RateChangeDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                IsKey            = true,
                BaseSchemaName   = "HumanResources",
                BaseTableName    = "EmployeePayHistory",
                BaseColumnName   = "RateChangeDate"
            });

            schema_array.Add(new VenturaSqlColumn("Rate", typeof(decimal), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 19,
                ProviderType     = 9,
                BaseSchemaName   = "HumanResources",
                BaseTableName    = "EmployeePayHistory",
                BaseColumnName   = "Rate"
            });

            schema_array.Add(new VenturaSqlColumn("PayFrequency", typeof(byte), false)
            {
                Updateable       = true,
                ColumnSize       = 1,
                NumericPrecision = 3,
                ProviderType     = 20,
                BaseSchemaName   = "HumanResources",
                BaseTableName    = "EmployeePayHistory",
                BaseColumnName   = "PayFrequency"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "HumanResources",
                BaseTableName    = "EmployeePayHistory",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[HumanResources].[EmployeePayHistory]";
        }
        public PriKey_Sales_SalesPersonQuotaHistory_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [BusinessEntityID],[QuotaDate],[SalesQuota],[rowguid],[ModifiedDate]" + CRLF +
                         @"FROM [Sales].[SalesPersonQuotaHistory]" + CRLF +
                         @"WHERE [BusinessEntityID] = @BusinessEntityID" + CRLF +
                         @"AND [QuotaDate] = @QuotaDate";

            _inputparametervalues = new object[2];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@BusinessEntityID", typeof(int), true, false, DbType.Int32, null, null, null);
            param_array.AddParameterColumn("@QuotaDate", typeof(DateTime), true, false, DbType.DateTime, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("BusinessEntityID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                BaseSchemaName   = "Sales",
                BaseTableName    = "SalesPersonQuotaHistory",
                BaseColumnName   = "BusinessEntityID"
            });

            schema_array.Add(new VenturaSqlColumn("QuotaDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                IsKey            = true,
                BaseSchemaName   = "Sales",
                BaseTableName    = "SalesPersonQuotaHistory",
                BaseColumnName   = "QuotaDate"
            });

            schema_array.Add(new VenturaSqlColumn("SalesQuota", typeof(decimal), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 19,
                ProviderType     = 9,
                BaseSchemaName   = "Sales",
                BaseTableName    = "SalesPersonQuotaHistory",
                BaseColumnName   = "SalesQuota"
            });

            schema_array.Add(new VenturaSqlColumn("rowguid", typeof(Guid), false)
            {
                Updateable     = true,
                ColumnSize     = 16,
                ProviderType   = 14,
                BaseSchemaName = "Sales",
                BaseTableName  = "SalesPersonQuotaHistory",
                BaseColumnName = "rowguid"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Sales",
                BaseTableName    = "SalesPersonQuotaHistory",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Sales].[SalesPersonQuotaHistory]";
        }
Ejemplo n.º 26
0
        public PriKey_Sales_CurrencyRate_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [CurrencyRateID],[CurrencyRateDate],[FromCurrencyCode],[ToCurrencyCode],[AverageRate],[EndOfDayRate],[ModifiedDate]" + CRLF +
                         @"FROM [Sales].[CurrencyRate]" + CRLF +
                         @"WHERE [CurrencyRateID] = @CurrencyRateID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@CurrencyRateID", typeof(int), true, false, DbType.Int32, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("CurrencyRateID", typeof(int), false)
            {
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                IsIdentity       = true,
                IsAutoIncrement  = true,
                BaseSchemaName   = "Sales",
                BaseTableName    = "CurrencyRate",
                BaseColumnName   = "CurrencyRateID"
            });

            schema_array.Add(new VenturaSqlColumn("CurrencyRateDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Sales",
                BaseTableName    = "CurrencyRate",
                BaseColumnName   = "CurrencyRateDate"
            });

            schema_array.Add(new VenturaSqlColumn("FromCurrencyCode", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 3,
                ProviderType   = 10,
                BaseSchemaName = "Sales",
                BaseTableName  = "CurrencyRate",
                BaseColumnName = "FromCurrencyCode"
            });

            schema_array.Add(new VenturaSqlColumn("ToCurrencyCode", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 3,
                ProviderType   = 10,
                BaseSchemaName = "Sales",
                BaseTableName  = "CurrencyRate",
                BaseColumnName = "ToCurrencyCode"
            });

            schema_array.Add(new VenturaSqlColumn("AverageRate", typeof(decimal), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 19,
                ProviderType     = 9,
                BaseSchemaName   = "Sales",
                BaseTableName    = "CurrencyRate",
                BaseColumnName   = "AverageRate"
            });

            schema_array.Add(new VenturaSqlColumn("EndOfDayRate", typeof(decimal), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 19,
                ProviderType     = 9,
                BaseSchemaName   = "Sales",
                BaseTableName    = "CurrencyRate",
                BaseColumnName   = "EndOfDayRate"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Sales",
                BaseTableName    = "CurrencyRate",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Sales].[CurrencyRate]";
        }
Ejemplo n.º 27
0
        public PriKey_Production_TransactionHistoryArchive_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [TransactionID],[ProductID],[ReferenceOrderID],[ReferenceOrderLineID],[TransactionDate],[TransactionType],[Quantity],[ActualCost],[ModifiedDate]" + CRLF +
                         @"FROM [Production].[TransactionHistoryArchive]" + CRLF +
                         @"WHERE [TransactionID] = @TransactionID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@TransactionID", typeof(int), true, false, DbType.Int32, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("TransactionID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                BaseSchemaName   = "Production",
                BaseTableName    = "TransactionHistoryArchive",
                BaseColumnName   = "TransactionID"
            });

            schema_array.Add(new VenturaSqlColumn("ProductID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                BaseSchemaName   = "Production",
                BaseTableName    = "TransactionHistoryArchive",
                BaseColumnName   = "ProductID"
            });

            schema_array.Add(new VenturaSqlColumn("ReferenceOrderID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                BaseSchemaName   = "Production",
                BaseTableName    = "TransactionHistoryArchive",
                BaseColumnName   = "ReferenceOrderID"
            });

            schema_array.Add(new VenturaSqlColumn("ReferenceOrderLineID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                BaseSchemaName   = "Production",
                BaseTableName    = "TransactionHistoryArchive",
                BaseColumnName   = "ReferenceOrderLineID"
            });

            schema_array.Add(new VenturaSqlColumn("TransactionDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Production",
                BaseTableName    = "TransactionHistoryArchive",
                BaseColumnName   = "TransactionDate"
            });

            schema_array.Add(new VenturaSqlColumn("TransactionType", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 1,
                ProviderType   = 10,
                BaseSchemaName = "Production",
                BaseTableName  = "TransactionHistoryArchive",
                BaseColumnName = "TransactionType"
            });

            schema_array.Add(new VenturaSqlColumn("Quantity", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                BaseSchemaName   = "Production",
                BaseTableName    = "TransactionHistoryArchive",
                BaseColumnName   = "Quantity"
            });

            schema_array.Add(new VenturaSqlColumn("ActualCost", typeof(decimal), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 19,
                ProviderType     = 9,
                BaseSchemaName   = "Production",
                BaseTableName    = "TransactionHistoryArchive",
                BaseColumnName   = "ActualCost"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Production",
                BaseTableName    = "TransactionHistoryArchive",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Production].[TransactionHistoryArchive]";
        }
        public PriKey_Sales_SpecialOfferProduct_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [SpecialOfferID],[ProductID],[rowguid],[ModifiedDate]" + CRLF +
                         @"FROM [Sales].[SpecialOfferProduct]" + CRLF +
                         @"WHERE [SpecialOfferID] = @SpecialOfferID" + CRLF +
                         @"AND [ProductID] = @ProductID";

            _inputparametervalues = new object[2];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@SpecialOfferID", typeof(int), true, false, DbType.Int32, null, null, null);
            param_array.AddParameterColumn("@ProductID", typeof(int), true, false, DbType.Int32, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("SpecialOfferID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                BaseSchemaName   = "Sales",
                BaseTableName    = "SpecialOfferProduct",
                BaseColumnName   = "SpecialOfferID"
            });

            schema_array.Add(new VenturaSqlColumn("ProductID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                BaseSchemaName   = "Sales",
                BaseTableName    = "SpecialOfferProduct",
                BaseColumnName   = "ProductID"
            });

            schema_array.Add(new VenturaSqlColumn("rowguid", typeof(Guid), false)
            {
                Updateable     = true,
                ColumnSize     = 16,
                ProviderType   = 14,
                BaseSchemaName = "Sales",
                BaseTableName  = "SpecialOfferProduct",
                BaseColumnName = "rowguid"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Sales",
                BaseTableName    = "SpecialOfferProduct",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Sales].[SpecialOfferProduct]";
        }
Ejemplo n.º 29
0
        public PriKey_Sales_Store_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [BusinessEntityID],[Name],[SalesPersonID],[Demographics],[rowguid],[ModifiedDate]" + CRLF +
                         @"FROM [Sales].[Store]" + CRLF +
                         @"WHERE [BusinessEntityID] = @BusinessEntityID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@BusinessEntityID", typeof(int), true, false, DbType.Int32, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("BusinessEntityID", typeof(int), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                IsKey            = true,
                BaseSchemaName   = "Sales",
                BaseTableName    = "Store",
                BaseColumnName   = "BusinessEntityID"
            });

            schema_array.Add(new VenturaSqlColumn("Name", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 50,
                ProviderType   = 12,
                BaseSchemaName = "Sales",
                BaseTableName  = "Store",
                BaseColumnName = "Name"
            });

            schema_array.Add(new VenturaSqlColumn("SalesPersonID", typeof(int), true)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 8,
                BaseSchemaName   = "Sales",
                BaseTableName    = "Store",
                BaseColumnName   = "SalesPersonID"
            });

            schema_array.Add(new VenturaSqlColumn("Demographics", typeof(string), true)
            {
                Updateable   = true,
                ProviderType = 25,
                IsLong       = true,
                XmlSchemaCollectionDatabase     = "AdventureWorks2017",
                XmlSchemaCollectionOwningSchema = "Sales",
                XmlSchemaCollectionName         = "StoreSurveySchemaCollection",
                BaseSchemaName = "Sales",
                BaseTableName  = "Store",
                BaseColumnName = "Demographics"
            });

            schema_array.Add(new VenturaSqlColumn("rowguid", typeof(Guid), false)
            {
                Updateable     = true,
                ColumnSize     = 16,
                ProviderType   = 14,
                BaseSchemaName = "Sales",
                BaseTableName  = "Store",
                BaseColumnName = "rowguid"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Sales",
                BaseTableName    = "Store",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Sales].[Store]";
        }
        public PriKey_Production_Location_Recordset()
        {
            _resultsets = new IResultsetBase[] { this };

            _sqlscript = @"SELECT [LocationID],[Name],[CostRate],[Availability],[ModifiedDate]" + CRLF +
                         @"FROM [Production].[Location]" + CRLF +
                         @"WHERE [LocationID] = @LocationID";

            _inputparametervalues = new object[1];
            _inputparamholder     = new InputParamHolder(_inputparametervalues);

            ColumnArrayBuilder param_array = new ColumnArrayBuilder();

            param_array.AddParameterColumn("@LocationID", typeof(short), true, false, DbType.Int16, null, null, null);

            _parameterschema = new VenturaSqlSchema(param_array);

            ColumnArrayBuilder schema_array = new ColumnArrayBuilder();

            schema_array.Add(new VenturaSqlColumn("LocationID", typeof(short), false)
            {
                ColumnSize       = 2,
                NumericPrecision = 5,
                ProviderType     = 16,
                IsKey            = true,
                IsIdentity       = true,
                IsAutoIncrement  = true,
                BaseSchemaName   = "Production",
                BaseTableName    = "Location",
                BaseColumnName   = "LocationID"
            });

            schema_array.Add(new VenturaSqlColumn("Name", typeof(string), false)
            {
                Updateable     = true,
                ColumnSize     = 50,
                ProviderType   = 12,
                BaseSchemaName = "Production",
                BaseTableName  = "Location",
                BaseColumnName = "Name"
            });

            schema_array.Add(new VenturaSqlColumn("CostRate", typeof(decimal), false)
            {
                Updateable       = true,
                ColumnSize       = 4,
                NumericPrecision = 10,
                ProviderType     = 17,
                BaseSchemaName   = "Production",
                BaseTableName    = "Location",
                BaseColumnName   = "CostRate"
            });

            schema_array.Add(new VenturaSqlColumn("Availability", typeof(decimal), false)
            {
                Updateable       = true,
                ColumnSize       = 17,
                NumericPrecision = 8,
                NumericScale     = 2,
                ProviderType     = 5,
                BaseSchemaName   = "Production",
                BaseTableName    = "Location",
                BaseColumnName   = "Availability"
            });

            schema_array.Add(new VenturaSqlColumn("ModifiedDate", typeof(DateTime), false)
            {
                Updateable       = true,
                ColumnSize       = 8,
                NumericPrecision = 23,
                NumericScale     = 3,
                ProviderType     = 4,
                BaseSchemaName   = "Production",
                BaseTableName    = "Location",
                BaseColumnName   = "ModifiedDate"
            });

            ((IResultsetBase)this).Schema = new VenturaSqlSchema(schema_array);
            ((IResultsetBase)this).UpdateableTablename = "[Production].[Location]";
        }