Solved

Replace in sql injection script

Posted on 2011-09-20
3
280 Views
Last Modified: 2012-05-12
Hi! I have an sql injection script that works fine. But if i want to replace one whole word by nothing and i write like this:

txtNew = replace(txtNew, "CAST", "")

Then the word CAST is replaced but you can still write cast or cAst for an example. How do i do if i want to relace the word and the relace should not care if it is a big or small letter?
0
Comment
Question by:MickeC
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 15

Expert Comment

by:pateljitu
ID: 36567127
Try this, uCase will convert string to UPPERCASE which will help replace function:

txtNew = replace(uCase(txtNew), "CAST", "")
0
 

Author Comment

by:MickeC
ID: 36567329
Thanks, but the the rest of the string also be in uppercase not just the word CAST.
0
 
LVL 15

Accepted Solution

by:
pateljitu earned 500 total points
ID: 36567964
That is correct, try this please:

txtNew = replace(txtNew, "CAST", "", 1, -1, 1)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
INNER JOIN ? 8 52
Cannot open file from ASP if user is "logged in" 13 32
edit .asp files 5 47
ASP Classic, check if Querystring is UCase or LCase 8 28
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question