velvetpuppet
Programmer
I'm usin' Coldfusion & S.Q.L. 2000 Server database. I'm tryin' to match the exact word that a user enters with a field called Contents.
I tried the followin' CFQuery:
<CFQuery name="Q_Users" datasource="DSN_IXS">
Select * From Users
Where User_ID In (#Category#)
And Contents = '#Keyword#'
</CFQuery>
But that CFQuery gave me an err msg sayin':
The text, ntext, and image data types cannot be compared or sorted, except when using NULL or LIKE operator.
I tried to replace the LIKE operator with the (=) operator as the followin':
<CFQuery name="Q_Users" datasource="DSN_IXS">
Select * From Users
Where User_ID In (#Category#)
And Contents LIKE '#Keyword#'
</CFQuery>
This time I got no err msg, but I got no result even if the word is contained in the Contents field.
Do you suggest any solution to the problem?
With regards
I tried the followin' CFQuery:
<CFQuery name="Q_Users" datasource="DSN_IXS">
Select * From Users
Where User_ID In (#Category#)
And Contents = '#Keyword#'
</CFQuery>
But that CFQuery gave me an err msg sayin':
The text, ntext, and image data types cannot be compared or sorted, except when using NULL or LIKE operator.
I tried to replace the LIKE operator with the (=) operator as the followin':
<CFQuery name="Q_Users" datasource="DSN_IXS">
Select * From Users
Where User_ID In (#Category#)
And Contents LIKE '#Keyword#'
</CFQuery>
This time I got no err msg, but I got no result even if the word is contained in the Contents field.
Do you suggest any solution to the problem?
With regards