Solved

Replace in sql injection script

Posted on 2011-09-20
3
286 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

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

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 was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

617 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