Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 SQL case-insensitivity select stament

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2000-11-16 : 15:04:05
Simon writes "Hello,

I'm trying to create a "smut" filter for a message board to filter out bad words. In order to filter out the words I'm using a vbScript ASP Replace stament as follows:

----------------------
'Connect to the databse
Set tblBadWords = Server.CreateObject("ADODB.Recordset")
tblBadWords.CursorType = adOpenStatic
tblBadWords.CursorLocation = 3
tblBadWords.Open "SELECT word FROM tblSmut", oConn

'Search though the message for bad words in the database and
'replace them with the text "*&@$".
For x = 1 to tblBadWords.RecordCount
strReplyMessage = Replace(strReplyMessage,tblBadWords("word"),"*&@$")
tblBadWords.MoveNext
Next

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

This works, however a user can simply change the casing of a word to bypass it. (e.g "word" will be filtered, but "WoRd", will not be).

Is there a SQL command i can use which will make the Select statment not case-sensitive?

I can't find anywhere that has been able to do it. If you can suggest the best way to acomplish what i'm trying to do, that'd be great.

Regards,


Simon.

Ps: running IIS 5.0 (win2k pro iis server), MS Access 2000 databse file."
   

- Advertisement -