Search For String
Is there any fast way to search for a specific string within all the files in a folder at a same time?
Is there any fast way to search for a specific string within all the files in a folder at a same time?
I am passing the following variables....
City - name of city
RentLow - low range of rent
RentHigh - high range of rent
myquery - keywords
The following is the start of my query string but I am having issues with the City portion already and I have not gotten to the rent yet
I know the SQLquery portion right below is fine - it tested perfectly, along with the rest of the query, it was when I added in the request city string that gives me No value given for one or more required parameters. even though one is passed in the string.
SQLquery = "(" &parsethis(strText ,words ,wCount, 3) & ")"
SQLquery = Replace(SQLquery, "<FIELD1>", "title")
SQLquery = Replace(SQLquery, "<FIELD2>", "description")
SQLquery = Replace(SQLquery, "<FIELD3>", "comments")
SQLstr = "SELECT * FROM links WHERE " & SQLquery & " AND city = " & Request.QueryString("city") & " AND linktype = 2 AND active = " & myTrue & " " & SortSQL & ";"
end if
i ve a string like this : my_name_is_ahmed_adly
now i need to see if this string contains the word "is"
so how can i do this ?
if i have a string with comma seperated words. is there a way to search another string for words that are in it?
View Replies View RelatedI have a page that is not asp that is linking to an asp page with a question mark and a variable on the end of the URL. How can I pull the variable off using server
side processing only?I have tried using ServerVariable("HTTP_REFERER") no good, I tried ServerVariable("URL") no good. I am also using Instr(var,"?") to search the url string like this.
Red1 = Requestor.ServerVariable("URL")
Test1 = Instr(Red1,"?")
Test1 is always a 0 because Red1 is always just the refering URL and I need the whole string in address field. I think that I am using the wrong property but I am not sure what is the right property.
I am having some trouble with getting reliable results with a search string I am using in an ASP page that uses embedded SQL.
In the ASP page, I am using checkboxes for the user to select states to search for records that apply to the selected states. Let's say that I checked the states of [GA][VA][TN]. And, let's say that there is a record with a column "states" which has the states of "AL,GA,FL,VA,TN".
The search criteria I use above will not return that record. However, If I use a search criteria that satifies the leading value of "states" or the trailing value of "states" the result will be returned. But since my search criteria 'breaks apart' the actual value of "states", it is not returned in the search. Why, and how can I make this work better?
I've made my first ASP website that interacts with a detabase. All fairly standard: it can display the entire contents of the db, you can input new items, update and delete items, and I've just started making a search page...[!]
It all works fine if the user just searches with one word, but if they enter more than one word and then press search, I don't know how to split their searchstring up into [an array of?] different strings to search the db with.
Is this even the easiest way to do it, or am I just wasting my time?
I am creating a search page and need help writing the code to build the sql
string.
I have 3 fields on the main page which a user can choose to enter search
terms in any of the 3 fields. My question is how do I write the logic so it
only includes the fields in the search criteria where the user has entered
anything.
Fields are
Production No
Production Title
Synopsis
The user may enter any, all or some of the search teams in the fields.
On the search page I am using lots of if conditions to build my sql string
like
strSQL = "Select * from Productions where "
now after where there are lots of permutations and combination like
production no could be empty or it could be filled in and the other fields
might be empty or filled in as well.
Does someone has a simple logic to build the correct sql String?
I'm trying to split my search string, So I can compare search results if the string was of two words such as: "world news"... But i'm a bit confused of how to do it using this code (FOR EXAMPLE): ....
View Replies View RelatedI'm trying to use the Microsoft Search to search for a text string in a folder full of a bunch of ASP files. Seems like the normal "Search for text in files" program in XP Pro won't search between the ASP delimiters <% %> .
How can I search for text strings in ASP a folder full of ASP files with out opening each one individually and searching?
In a HTML form field, the user enters a long text. I need to search for an image tag. Then get the name of the image (*.gif or *.jpeg) to check the image library if the image already exists. If exists, cannot upload the image. Else, upload the image.
View Replies View RelatedThis is probably simple and I'll kick myself when I see the answer, but I am trying to write a simple if statement that will check to see if a string value is contained within a list of string values. In SQL this is a simple matter with syntax like WHERE status IN ('PT', 'PD', 'PDC', 'DIP', 'TIP') I basically want to do the same thing in my ASP page.
I know I can use code like the following and am doing so now. I'm just looking for a more simple method. Code:
Is it possible to search a string for a upper case character? Here is what I am trying to do:
I have the following string:
Quote: str = "ProjectSectionPlanning"
I'm trying to break this string into:
Quote: str = "Project Section Planning"
I want to search a string of HTML and insert a querystring into any url where the url is an asp page and is either a local link /folder/page.asp or of a specific domain http://www.somedomain.com/folder/page.asp. It needs to be able to handle plain links and those with querystrings already in there.
I could do it with instr functions etc but I thought this might a good time to brush up on regular expressions. Can anyone point me in the right dirction?
what I would like to do is remove a substring from a full string and display the modified string my basic code should be some like this:
strSearchString = FullString
strSearchFor = "SubString"
If InStr(1, strSearchString, strSearchFor) > 0 then
Response.write (FullString - Substring)
does anyone have any idea how I would go about doing this?
i get the ref url that come to my site and i want to convert it to find
out what was the query in (google or other searcher sites)
foe example : if someone goes to google and search some text and my
site was in his resaults and he click on it , in my site i see his link
ref like
http://www.google.co.il/search?hl=i...91-Google&meta=
i want to know (in asp and save it to DB) what was the word or words
that the user write in search engine.
I'm developing an Asp.NET system to take a CSV file uploaded via the web, parse it, and insert the values into an SQL database. My sticking point comes when I try to split() the string returned by readline() on the file.
The following code snippet works for me:
tokens = "one,two,three,four".Split(",")
for each token in tokens
response.write("<td>"+token+"</td>")
next
However, if I take the next line in the CSV, read using StreamReader.ReadLine on the PostedFile.InputStream, I receive "Object reference not set to an instance of an object." which I have narrowed down to be my string holding the line. Further investigation reveals that no other string member functions work on my line (.ToCharArray, .ToString, etc).
I suspect that StreamReader.ReadLine is not correctly returning a string, even though Response.Write(line) displays what I would expect .....
I have a form in which several elements are expected to be all digits. Some of those elements can be left empty, but if specified they must be all digits. I have this Sub to edit them: ....
View Replies View RelatedI am pulling info from a sql server By default the query pulls back the inforamtion as text.Therefore when I go to calculate some figures its giving me a type mismatch error.
Is there a function in can call to convert a text string to an integer string using
rstSearch.Fields("name").Value .To pull back the info in a for loop
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch
I am trying to create a parametric search within a table (in the column headings). My first page (search.asp) allows you to choose parameters from a dropdown box, such as package and volts. You click "search" and it reads the Access dbase to yield the results.
The results page (results.asp) displays the information based on the parameters. Under the package column heading, I have the same drop down box, and I am able to once again choose the package I want and the table will refresh. Code:
I have list of songs in table in asp page. I would like to put a link to each song so when user click on one I can search database for it's data. How to do that?
View Replies View Relatedi have a database with 5 tables,
on my web site i have a search bar..
i wana link that search bar to my tables so..
when ever some 1 searchs for a product, the search bar shows that all the simmuler products to what they searchd for..
I was wondering if there was a way to search pages using ASP or ASP.NET.
I have roughly 5000 static html pages (an online library of sorts) and wants a serch feature. Is there any way to do this?
how to search within the selected category?? Example : Search "bubble clock" in category,Clock and watches.
View Replies View RelatedI have a search page that has ms frontpage database wizard results showing. The thing is, is that I want to have the search form on other pages besides my search.asp page. Does anybody know how to make a search form on a seperate page that submits the search to the database and displays the wizard results on the search page.
View Replies View RelatedNeed help here~ =) ..For -> while not rsConfiguration1.EOF ... blah blah blah
How to write my code so that even if its not End of record, it will still search my db?
In short : I want the db to be able to search under 2 circumstances : EOF and not EOF
How could I try and make the most important result from a search show up on top?
I was thinking of having a result where the strSearch is the most to the left come up on top but else then that vague and not necessarly effective option I have no idea on how to do this.
Intranet tech support system using ASP/VBScript running on W2000 Server,
IIS, and using SQL Server 2000. I need to add a search engine. The problem
with using a regular SQL query is that if you put a phrase, say "red car" in
the text box, to hit submit, my SQL qurey would only look for that phrase,
and would leave out other items where the words red and car appeared
separately. I guess what I am saying is that I would like something like
Google or other search engines, which would find results which seem to fit
the criteria typed into the box, and rank them and highlight key words.
My research so far has shown me that SQL Server has something called
Full-Text searching, and I have tried to read up on that in BOL, but not
really seeing how I can apply it. I wonder if there's already some tutorials
or sample code out there. I have done some looking on the Web, but still
haven't found much.
I have created an asp server page as described in the
Microsoft Article 318387 HOW TO: Query Index Server Data
by Using ASP in FrontPage 2002
(http://support.microsoft.com/?id=318387)
It is running off my IIS server for the search results.
However, the results return only file locations; I would
like it to return a link to the hits. How would I do this?
im now doin a search function... but my problem is... if i didn't enter any data in the textbox and then click search button, it will appear all list from database instead of display "please key in data".
I just want to display "please key in data" but not display all records. Code:
I'm make a search and I want to limt the results to 10 and have a next button.
View Replies View RelatedWith Index Server I can search web pages stored on our servers. Is there any
way to programmatically search web pages on the web ?
I am trying to set up a pge that allows users to search DB for their order status. I managed to get it working with 1 search parameter. I would like to give my clients more then 1 search option to search by.
This is where I ran into problem. I believe it to be with my lack of ASP knowledge and the problem here is with the SQL statement. I do not think that it will work the way SQL statement is set up right now but I am at a loss for correct syntax here. Am I way off ? Code: