Commerce Server Catalog - RE: CreateProperty doesn't create types of boolean, double, or big

This is Interesting: Free IT Magazines  
Home > Archive > Commerce Server Catalog > March 2005 > RE: CreateProperty doesn't create types of boolean, double, or big





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author RE: CreateProperty doesn't create types of boolean, double, or big
Aaron L. Richards

2005-03-02, 8:47 pm

All these properties are created in the catalog system. I can do without
BigInts, but booleans would be very nice to have. Doubles too for that
matter. I KNOW those have got to be supported!

""Vinayak Tadas[MSFT]"" wrote:

> Are all these properties craeted in the catalog system?
> As far as I Know Bizdesk does not support Biginteger properties.
> --------------------
> Thread-Topic: CreateProperty doesn't create types of boolean, double, or
> bigInt
> thread-index: AcUfUc5lfl2HMjPJSXKzqleIjt4S8w==
> X-WBNR-Posting-Host: 64.186.62.22
> From: "=?Utf-8?B?QWFyb24gTC4gUmljaGFyZHM=?=" <Aaron L.
> Richards@discussions.microsoft.com>
> Subject: CreateProperty doesn't create types of boolean, double, or bigInt
> Date: Wed, 2 Mar 2005 10:01:06 -0800
> Lines: 81
> Message-ID: <46D42450-2F35-43A9-9996-93172A4BE0DA@microsoft.com>
> MIME-Version: 1.0
> Content-Type: text/plain;
> charset="Utf-8"
> Content-Transfer-Encoding: 7bit
> X-Newsreader: Microsoft CDO for Windows 2000
> Content-Class: urn:content-classes:message
> Importance: normal
> Priority: normal
> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
> Newsgroups: microsoft.public.commerceserver.catalog
> NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.1.29
> Path: TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA03.phx.gbl
> Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.commerceserver.catalog:5279
> X-Tomcat-NG: microsoft.public.commerceserver.catalog
>
> Using Commerce Server 2002 FP1, VS.Net 2003, C#, Server 2003
>
> I am creating a routine that creates properties of products
> programmatically
> using the CreateProperty method. In testing it, I've found that it creates
> properties of every available type, except cscBoolean, cscDouble, and
> cscBigInteger.
>
> In creating Booleans and Doubles, it creates the property name, but doesn't
> assign it a type, as viewed in BizDesk the type field is blank. In
> creating
> BigIntegers, it creates an "invisible" property, such that the first run of
> a
> given property of type BigInt doesn't create anything viewable, but doesn't
> fail either. The second attempt at creating a BigInt property with the
> same
> name as that in the first attempt causes an already exists type exception
> violation.
>
> Below I've posted the wrapped call to CreateProperty that I am using:
> public virtual ADODB._Recordset CreatePropertyDefinition(string
> propertyName, CatalogDataTypeEnum dataType, object maxLength)
> {
>
> ///
>
> ADODB._Recordset propertyDefinition = null;
>
> try
> {
> CatalogManager CatManager = GetCatalogManager();
>
> //if (!this.PropertyExists(null, propertyName))
> //{
> propertyDefinition = (CatManager.CreateProperty(propertyName,
> dataType,
> maxLength));
> //}
>
> //CatManager.
> }
> /// Catch exceptions in attempt to recover and record issues.
> catch (Exception ex )
> {
> bool rethrow = ExceptionPolicy.HandleException(ex, "Logging Exception
> Policy");
> if (rethrow)
> {
> throw;
> }
>
> }
>
> return (propertyDefinition);
>
> }//End CreatePropertyDefinition
>
> ===============================
> And here is some of the calling code:
> // This call works
> existingProperties = CatSchema.CreatePropertyDefinition("TestPropText",
> CatalogDataTypeEnum.cscText, 16);
> Assert.AreEqual(existingProperties.Fields["PropertyName"].Value,
> "TestPropText", "TestPropText Failed");
>
> // This call creates a property called TestBoolean but has not type when
> viewed in BizDesk
> existingProperties = CatSchema.CreatePropertyDefinition("TestBoolean",
> CatalogDataTypeEnum.cscBoolean, 64);
> Assert.AreEqual(existingProperties.Fields["PropertyName"].Value,
> "TestBoolean", "TestBoolean Failed");
>
> // This call creates a property called TestPropDouble but has not type when
> viewed in BizDesk
> existingProperties =
> CatSchema.CreatePropertyDefinition("TestPropDouble",
> CatalogDataTypeEnum.cscDouble, 64);
> Assert.AreEqual(existingProperties.Fields["PropertyName"].Value,
> "TestPropDouble", "TestPropDouble Failed");
>
> existingProperties =
> CatSchema.CreatePropertyDefinition("TestPropBigInt",CatalogDataTypeEnum.cscB
> igInteger, 64);
> Assert.AreEqual(existingProperties.Fields["PropertyName"].Value,
> "TestPropBigInt", "TestBigInt Failed");
>
> ===========================
> Any help would be appreciated!
>
>
> Thanks
> Vinayak Tadas
> Microsoft
> http://blogs.msdn.com/vinayakt
>
> This posting is provided "AS IS" with no warranties, and confers no rights.
> You assume all risk for your use. © 2002 Microsoft Corporation. All rights
> reserved.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> Get Secure! For more info visit http://www.microsoft.com/security. Please
> reply to the newsgroups only

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com