PRB: Incorrect Error Message When Empty Handle Is Passed to RemoveSpecSearchClause (326762)



The information in this article applies to:

  • Microsoft Commerce Server 2002

This article was previously published under Q326762

SYMPTOMS

When you use the RemoveSpecSearchClause function in Commerce Server 2002, you may receive an incorrect error message that indicates that Input Parameter 2 is not valid.

CAUSE

The error message is generated when an empty handle is passed to the RemoveSpecSearchClause function.

RESOLUTION

For the RemoveSpecSearchClause function, there is only one parameter possible. To resolve the problem, correct the parameter that is passed to the function so that it is not empty.

MORE INFORMATION

See the ProductCatalog object section in the product documentation.

Steps to Reproduce the Behavior

To reproduce the problem, run the following sample code. Use your password for <password>, and use your computer name for <computer_name>.
On Error Resume Next

Dim oCatMan, oProdCat, oRS, tmp, strHandle, newClause

Set oCatMan = CreateObject("Commerce.CatalogManager")
call oCatMan.Initialize("Provider=SQLOLEDB;Password=<password>;User ID=sa;Initial
     Catalog=Comm;Data Source=<computer_name>", true)
call oCatMan.ImportXML("samplecatalog.xml", true, true)
wscript.echo err.number & "; " & err.description
Err.Clear
Set oProdCat = oCatMan.GetCatalog("Adventure Works Catalog")
wscript.echo err.number & "; " & err.description
Err.Clear
newClause = oProdCat.RemoveSpecificationSearchClause("")
wscript.echo err.number & "; " & err.description
Err.Clear
				

Modification Type:MajorLast Reviewed:9/13/2002
Keywords:kbprb KB326762