Select the search type
  • Site
  • Web
Search
You are here:  Support/Forums
Support

Bring2mind Forums

DMX 6: Issue with DMX_GetCategoryByName
Last Post 12/01/2011 11:39 AM by Peter Donker. 3 Replies.
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
Jesse Hormachea
New Member
New Member
Posts:8


--
11/21/2011 8:34 PM
I believe there is an issue with the stored procedure DMX_GetCategoryByName. In it, there is an INNER JOIN dbo.DMX_CategoriesML cl ON c.CategoryId=cl.CategoryId AND cl.Locale=@Locale.

This causes the query to return no values unless there is a corresponding entry in DMX_CategoriesML which is not always the case.

To provide some context, I am using the following code block to populate a dropdown with a list of subcategories based on a category name. The only way I was able to get this to work is to change the above relationship to a left join. I believe this is correct based upon the logic in other similar SPs such as DMX_GetSubCategories which joins the same tables but uses a left join.

-------------------------------------
int industries = CategoriesController.GetCategoryByName(PortalId, "Industries", string.Empty).CategoryId;
ddlIndustries.DataValueField = "CategoryId";
ddlIndustries.DataTextField = "CategoryName";
ddlIndustries.DataSource = CategoriesController.GetSubCategories(PortalId, industries, System.Threading.Thread.CurrentThread.CurrentCulture.Name);
ddlIndustries.DataBind();
ddlIndustries.Items.Insert(0, "All Industries");

}

-------------------------------------------

I was hoping to get your thoughts on whether this is an actual issue with that query or if I'm misinterpreting how to use that. I'm updating a custom document list module we have built to work in DMX 6 and ran into this issue after working in the new API.
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
11/24/2011 4:08 PM
Thanks Jesse .. may have caught this just in time.
Jesse Hormachea
New Member
New Member
Posts:8


--
11/28/2011 9:57 PM
No problem. Glad I could help.
Peter Donker
Veteran Member
Veteran Member
Posts:4536


--
12/01/2011 11:39 AM
You'll find it repaired in the final release that went out this week. Thanks again.
You are not authorized to post a reply.