I’m creating an HQL query to filter a grid of data:
string formatString = "Type = {0} AND {1} = '{2}' AND CompletedDate > '{3}'
AND CompletedDate < '{4}' AND UserName LIKE '{5}'";
HqlBindingSource.Where = string.Format(formatString, type, keyId, entityID,
fromDate, toDate, toDate, UserTextBox.Text);
The problem I’m having is the string matching on the UserName field. I’m used to working with SQL and I can’t get it to match on a value using = or LIKE. Can anyone point me in the right direction for this?
Thanks
I had “toDate” listed twice, so UserTextBox.Text was never used in the query.