InSTR Is Case Sensitive

Just used this code and noticed it doesn't always work, turns out InStr is case sensitive.What's thet best way to do a non-case sensitive search?pHP Code:

IF INSTR(VideoName,"HiRes") THEN 

View Replies


ADVERTISEMENT

Case Sensitive

i have this on my signup page
Set rs = Conn.Execute("SELECT * from rounds")

DO WHILE NOT rs.EOF

IF request.form("username") = rs.fields.item("username").value THEN

response.redirect("register2.asp")

END IF

rs.MoveNext
LOOP

the problem is.. some who signed up as say Jeff can still sign up as jeff
or jeFF how can i fix this??

View Replies View Related

Case-sensitive

My problem is like this:

http://www.4guysfromrolla.com/webte...q022400-1.shtml

But I use ASP + Access (Jet SQL 4)

View Replies View Related

Not A Case Sensitive Search?

Below is my sql search code in my asp page. But my search seems to be case sensitive. How can i modify it to make it not case sensitive?

<%
sqlString = "SELECT product_image, product_name, product_description, product_price " &_
"FROM Products " &_
"WHERE product_status = 1 " &_
"AND ( product_name LIKE '%" & searchFor & "%' " &_
"OR product_description LIKE '%" & searchFor & "%') " &_
"ORDER BY product_name "

SET RS = Conn.Execute( sqlString )
IF NOT RS.EOF AND searchFor <> "" THEN
%>

View Replies View Related

Case Sensitive Password

I have tried searching various sites including this one and I cant find a straight forward answer.


Code:

strSQL = "SELECT user.username FROM user WHERE username = '" & myUsername & "' AND password = '" & myPassword & "';"

How do I check for case sensitivity?

View Replies View Related

Case Sensitive Password

how can I make the password entered into a database case sensitive when a user tries to sign in?

View Replies View Related

Case Sensitive Queries

any way of searching a database without case sensitivity? Make any sense?! I have an Access 2000 db with 11 fields in it: Name, Keywords..., Description... But whenever I try to search through it using the ASp site I made, it'll only find matches if they are written identically, I.E a search for "bob" won't find the entry "Bob".

I thought about making the entire contents of the db Uppercase, but I don't want to, as that would look crap when the contents are displayed in the website.

View Replies View Related

Not A Case Sensitive Search

Below is my sql search code in my asp page. But my search seems to be case sensitive. How can i modify it to make it not case sensitive?

<%
sqlString = "SELECT product_image, product_name, product_description, product_price " &_
"FROM Products " &_
"WHERE product_status = 1 " &_
"AND ( product_name LIKE '%" & searchFor & "%' " &_
"OR product_description LIKE '%" & searchFor & "%') " &_
"ORDER BY product_name "

SET RS = Conn.Execute( sqlString )
IF NOT RS.EOF AND searchFor <> "" THEN
%>

View Replies View Related

Case Sensitive Files

i have developed an application with some of the files name myfile.asp, others TheFile.asp and others THATFILE.asp, that is i change the case in the names of the files. everything works on my pc, however i don't have much of cross-browser experience and before lauching it, i want to know if would matter or not? would it make any difference on Netscape, IE earlier versions, firefox, opera and so on.

in some of my files i use username, others UserNAME, others User Name and so it hereby used Request.form("username") or Request.form("User Name") Does this also makes any difference? I am basically talking about cross-browser viewing of the application.

View Replies View Related

Case Sensitive Data

When a read a field (string) in my script and checks whether it matches user input or not, the comparison is case sensitive. Eg Code:

x=objRS1.Fields("Login_Name")
If (x=User_Input_Variable) Then
Code
End If

How do I drop the case sensitivity?

View Replies View Related

Case Sensitive Search

I have some stored values in a DB. When I search for a username I don't want to retrieve anything unless all characters match exactly. Assume a user has chosen "HeLLo" for username. Then I don't want the SQL string to store that name in the recordset when names like "hello" or "Hello" is searched.

The way my code works now, it doesn't pay any attention to whether it is lower or upper case. How can I search a DB and only store the values in the recordset if all cases match?

View Replies View Related

How To Determine Case Sensitive Text

I want to know how case sensitive works...simple code for an idea..thanks

View Replies View Related

Case Sensitive In Replace Function In ASP

I use a replace char function to remove any bad words from user's input to prevent SQL injection. Here is what I use:

Function killChars(strWords)
Dim badChars, newChars
badChars = Array("bad words here")
newChars = strwords
For i=0 to uBound(badChars)
newChars = replace(newChars, badChars(i), "")
next
killChars=newChars
End function

Now the problem is if a user enter "DeLETe" in the input box, and this word is not get removed before entering the DB. because I entered "delete" in the badchars array.

so how can I enable a case sensitive in my function? So the bad words would get deleted regardless its in upper or lower case?

View Replies View Related

Case Dependancy Trouble With InStr() And Mid()

I'm having some trouble with an error that is thrown when I use InStr() and Mid() with a database search query. In point form:

I am retrieving an array strings from my database where the query is case insensitive. This is good.

Then I locate the keyword in the string using InStr() which is case sensitive. This is not desireable as it doesn't recognize all instances of the keyword.

I use the Mid() function to give me a portion of the string starting at the location provided by InStr() which is sometimes the number zero which in turn throws the error.

View Replies View Related

Make Asp "case-sensitive"

how do we make asp check the case of the strings entered.i currently have a running db login... the thing is that i cant make asp check the case of the passwords entered..... and my search pages cant distinguish between "product" and "product" in a search page

View Replies View Related

Dim Inside Select Case Executes In Any Case?

Code like this
=======================
Select case q
Case "a"
Dim arr(5)
Case "b"
Dim arr(2)
end select
=====================
returns an error saying variable arr redefined.
Should it be like that or an I using Select incorrectly? Perhaps something
similar to break needs to be used?

View Replies View Related

Upper Case And Lower Case

I need to filter the records of a table where the records contain a searchin string with no case sensitive compare, and all with one only sql statement.

"SELECT * FROM Stuff WHERE LOWER(StuffName) LIKE '%" & lcase(StrSearch) & "%'"

but the error is in the function LOWER exist a similar function ?

View Replies View Related

Instr

Why does this code Code:

Dim mytext
mytext = "Tristique, sed tamen typicus amet, bene quia feugait eu. "
Response.Write Instr(mytext, "tamen")

Gives the response "16"? Surely this word only appears once? Is it counting letters? How can I make it identify just words?

View Replies View Related

InStr

How do I use InStr to find the string d="1"

I have tryed:

InStr(text,"d=&quot;1&quot;") and it does not work

I have tryed a few other variations and I cant get it to work.

View Replies View Related

Access, Not Instr

I dont want those Disp selected from access db...I am getting an error..How will I do that ?
Microsoft VBScript runtime error '800a000d'

Type mismatch: '[string: "49, 50"]'

/drv_sch/Generate_Sch.asp, line 55
----------------------------------------
Driver_id is a number...Disp variable has these data "49, 50, 51"
SELECT * FROM schedule WHERE not instr('Disp',driver_id)

View Replies View Related

Instr Searches

I am searching a string that look like this (21,5,15,25) using Instr().
So, if I am searching for '5', I get everything that contains a five.

If InStr("21,5,15,25", req,QuerStr("id") Then
response.write "yes"
End If

I want only the one value '5' to get found but anything that contains a 5 is found. I have tried using Cint and Int to no avail.

View Replies View Related

InStr, Substr, Mid

I have a field name "tracks" of string data type that has multiple names in it (for example: calder delaware$ aqueduct ), and I want to check to see if this certain field has "delaware$" in it. InStr or the Mid functions return the numerical order of where that string starts inside the string, but it doesnt tell me if "delaware$" exists in "tracks".

View Replies View Related

Instr() - Meaning

was the instr() in asp means... meaning - why it is used.

View Replies View Related

Reliable Instr() ?

Using MySQL as a DB, I'm generating an OTF SQL statement that looks for matches in a comma delimited string. The code ends up looking something like this: Code:

View Replies View Related

Left And Instr Functions

I am having a problem with the following code:

<%
If Len(TestRS.Fields.Item("Testimonial").value) > 150 Then
Response.Write(Left(TestRS.Fields.Item("Testimonial").Value,150)&""... <br><font size=1><a href=""/Testimonials.asp"">Read More</a></font>")
Else
Response.Write(TestRS.Fields.Item("Testimonial").Value)
End If
%>

I am getting a null response from TestRS.Fields.Item("Tesimonial").Value after it is processed by the Len function.

I am getting the following result: Quote: "... Read More This tells me that the len function is analysing the string to be greater than 150 charachters yet the string is not being expressed.

View Replies View Related

Should I Use LIKE Or InSTR For A Database Search?

Which is better practice?

Code:
Select * From groups Where groupName LIKE '%bli%' AND cusType LIKE 'CUST%'
or

Code:
Select * From groups Where InStr(groupName,'li')>0 AND InStr(cusType,'CUST')=1
Right now I'm using and Access database but plan to upsize to a MSSQL if that makes any difference. Are there any advantages or disadvantages to either technique?

View Replies View Related

Instr Type Function

I've been given a large database of "model numbers". based on these model number I have to do something different. example model numbers:

B2020-SG1
B2020-SG4440
B2020-LG3
B2020-LG33E
B2020-SG1-SG1
B2020-SG1TD9-SG1
B2020-SG1TD15-SG4440

Basically, the first number (B2020, which could be a number of different numbers) is the model. the second and/or third number is what I have to act on. The problem is, how do I pull that third number? Especially if its the same as the first number. right now I'm using Instr(variable1, "SG1") to pull each different set of numebrs. but that only finds the first occurence. what about the 2nd? how can I find that?

View Replies View Related

Instr Function Generates Error

My question is

I use:
-----------------------------
dim strText,pos
strText = "This is a test!!"
pos = Instr(strText,"a",1)
response.write pos
-----------------------------
and i get:

Type mismatch: '[string: "This is a test!!"]'

What's going on?

View Replies View Related

String With Commas, How To Use Instr And Mid Function In A Loop?

I have a string --> 7,8,9,10. This string may contain more or less than 4 numbers.
I want to separate each number and run an sql query for each number.

for example:

select * from table1 where code = '7'

select * from table1 where code ='8'

and etc....

Can I do this in a loop?

View Replies View Related

Invalid Procedure Call Or Argument: 'InStr'

I get this error melding >>>Invalid procedure call or argument: 'InStr' and this is the code where this error refers to:

If (InStr(r, UCase(strRetVal), "<TABLE>") > 0) AND _(InStr(r, UCase(strRetVal), "<TABLE>") < _
InStr(r, UCase(strRetVal), "</TD>")) then ThisCellText = mid(strRetVal, StartCellText, _
InStr(r, UCase(strRetVal),"<TABLE>")- StartCellText )
Else
ThisCellText = mid(strRetVal, StartCellText, _
InStr(r, UCase(strRetVal), "</TD>")- StartCellText )
End If

in this area i am doing something, can anyone plz direct me and tell whats wrong?

View Replies View Related

Case ASP

I have this below. If there are 0 records, I want to do nothing, which it
does. I need to perform a task if there is more than one. Case > 1 doesn't
work. The most records I would have are 5.

mycount=rs.recordcount

Select Case mycount

Case 0

Response.write ("No Records")

Case 1

View Replies View Related

How To Use Select Case

I was trying to colorize my Events from my eventtable.
Past = Grey
Today = Yellow
Future = Blue

Now my question:

How can i specify a statement not when its EQUAL to a number but greater or less than zero for example

I tried this thing and some else but it didn't really work...

color="#6464ce"
Case Else
color="black"
End Select

Probably its a simple solution and don't see the forest because there are so many trees

View Replies View Related

SELECT CASE In ASP?

I am having a hard time understanding how to use a SELECT CASE in ASP. I
have used it in VB but never in ASP scripting.

Scenerio:

I have 2 textboxes on a form that I have to allow entry to one or the other
or Both at the same time. Now I tried to use an If ElseIf but it got too
hard to track, so now I am using a SELECT CASE Statement.

TEXBOX1 named strEnglish
TEXBOX2 named strFrench

My code:
<%
strEnglish=Request.Form("strEnglish")
strFrench=Request.Form("strFrench")

Select Case

Then I have no idea how to go from here, because I have 2 input textboxes to
follow. Code:

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved