Important alert: (current site time 7/15/2013 10:53:16 PM EDT)
 

winzip icon

ASP Search Engine

Email
Submitted on: 2/21/2000 1:00:00 PM
By: Scott Moss  
Level: Not Given
User Rating: By 9 Users
Compatibility: ASP (Active Server Pages)
Views: 57730
 
     Updated: (Version 1.2) ASP Simple Search Engine. This search engine will scan your the directory and all sub directories from where the ASP file is based for occurances in files of the test string being searched for. It will them make a file with all matching files, just like a ssearch engine. This has added features. Argonaut (Scott A. Moss) - www.vbstuff.cjb.net
 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzip to decompress it.Virus note:All files are scanned once-a-day by Planet Source Code for viruses, but new viruses come out every day, so no prevention program can catch 100% of them. For your own safety, please:
  1. Re-scan downloaded files using your personal virus checker before using it.
  2. NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
  1. You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
  2. You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
  3. You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
  4. You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 1 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Not Given category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor (See voting log ...)
 

Other User Comments

3/1/2000 11:38:53 AMMario Figueiredo

Hello :)

I've tried your code and it gave me a "Input past end of file" error in line 44 on zero length files. I suggest a simple trap for this error before you use the ReadAll method.

Also, wouldn't it be less time consuming if you tested first the filter settings established on the strFile var before going on and opening a file that is not part of that filter condition?

Great code, nevertheless!

Mario
(If this comment was disrespectful, please report it.)

 
8/12/2000 4:40:29 AMkartik

HELLO SIR,
I MUST SAY THAT UR CODE IS REALLY VERY GOOD AND IT HELPS ME A LOT BUT PLZ "ITS URGERT" CAN U TELL ME THE SOLUTION OF PLOBLEM GIVEN ABOVE EVEN I AM FACING THE SAME PROBLEM.
MINE EMAIL ID IS kartik@pixellent.com or u can mail me at sharmakartik@rediffmail.com
plz its urgent...if u can help me.
THANKS

(If this comment was disrespectful, please report it.)

 
8/24/2000 2:34:52 PMASPboy

Great code, but can you also send me a solution with the error noted above?
Please email me at tpb24@yahoo.com
Thanks!
(If this comment was disrespectful, please report it.)

 
8/30/2000 6:01:26 PMaraknis

if anyone has a solution to the above problem please post it or email it to me
thanks
tuner1@hotmail.com
(If this comment was disrespectful, please report it.)

 
3/2/2001 11:44:21 AMMike

Hmm...

Search Results for 'Products'

Microsoft VBScript runtime error '800a003e'

Input past end of file

/search.asp, line 44

...Any ideas?

Carpe_Cannabis@hotmail.com
(If this comment was disrespectful, please report it.)

 
3/8/2001 9:00:34 PMxiong

Great code, but can you also send me a
solution with the error noted
above?
Please kindly mail to
iloveu79@hotmail.com
ThankS ~ !
(If this comment was disrespectful, please report it.)

 
3/22/2001 9:50:13 AMsonman

I am getting a different error. I keep getting a script time out error and I even went in and changed the time out from 90 seconds to 3 minutes and I still get the error. sonmanvb@hotmail.com
(If this comment was disrespectful, please report it.)

 
3/24/2001 6:27:04 AMNitin Nanivadekar emailnitin@yahoo.com

The result of the script program shows only one success when there are many pages that contain the string I have entered. Can somebody provide remedy?
(If this comment was disrespectful, please report it.)

 
4/25/2001 8:56:24 AMMurugesh

Hello,
the code u have given is very great, while using it i'm getting an error message of
(If this comment was disrespectful, please report it.)

 
6/5/2001 7:32:22 AMChavo

BUG FIX: To avoid seeing 'Input past end of file' msg do the following:
1. Open search.asp in Notepad and find the line:
Set objTextStream = objFSO.OpenTextFile(objFile.Path,fsoForReading)

2. Change it to :
Set objTextStream = objFSO.OpenTextFile(objFile.Path,fsoForReading, False)
If not (objTextStream.AtEndOfStream) then

3. Find the lines:
End if
objTextStream.Close

4. And change them to:
End If
End if
objTextStream.Close

Good luck, guys!
(If this comment was disrespectful, please report it.)

 
1/6/2003 6:24:31 AMjohann natividad

code doesn't work! could you send me the
(If this comment was disrespectful, please report it.)

 
2/4/2003 4:42:45 AMAsim (The Extreme Coder)

mr.developer of this search engine. I have kinda downloaded the code.

can u tell me what should be the root directory? where it will read the files.

mine is ://12.0.0.1/projects/search_example/searchpage.asp
://12.0.0.1/projects/search_exampl e/test_doc.html

r
the both right paths ? or should I do some thing about it
(If this comment was disrespectful, please report it.)

 
3/14/2003 2:36:30 AM

this site isvery best site i have seen
(If this comment was disrespectful, please report it.)

 
6/23/2003 6:12:16 AM

Aba eh nag share ka pa, ala namang kwenta
(If this comment was disrespectful, please report it.)

 
8/25/2003 3:20:45 AM

Excellent code
could you give me the latest version

thanx alot
(If this comment was disrespectful, please report it.)

 
12/29/2003 4:48:27 AM

great code!!!
(If this comment was disrespectful, please report it.)

 
3/7/2004 1:41:15 PM

Hi All I wanted to thank Chavo for posting the bug Fix..I was wondering how would I display the Paragraog also with the word highlighted, I also noticed that the search looks up HTML also so try searching for
(If this comment was disrespectful, please report it.)

 
3/7/2004 1:43:02 PM

Hi All I wanted to thank Chavo for posting the bug Fix..I was wondering how would I display the Paragraog also with the word highlighted, I also noticed that the search looks up HTML also so try searching for "table" .. It will list all page
(If this comment was disrespectful, please report it.)

 
1/25/2005 11:13:39 AM

I don't know why when i try to search for doc or d or word inside the search engine it is unable to search and the error msg is time out.
(If this comment was disrespectful, please report it.)

 
2/7/2005 1:59:59 AM

HELLO SIR,
I MUST SAY THAT UR CODE IS
REALLY VERY GOOD AND IT HELPS ME A LOT
BUT PLZ
(If this comment was disrespectful, please report it.)

 
7/17/2005 4:08:06 AMritesh11

Function CreateDataAdapter(ByVal cn As IDbConnection, ByVal sql As String) As DbDataAdapter ' We must box CN to invoke the GetType method.
Dim cnType As Type = CObj(cn).GetType() Dim asmName As String = CObj(cn).GetType().Assembly.FullName
Dim daTypeName As String = cnType.FullName.Replace("Connection", "DataAdapter")
Dim daType As Type = Type.GetType(daTypeName & "," & asmName)
Dim args() As Object = {sql, cn} Dim da As DbDataAdapter = DirectCast(Activator.CreateInstance(daType, args), DbDataAdapter)
Dim cbTypeName As String = cnType.FullName.Replace("Connection", "CommandBuilder") Dim cbType As Type = Type.GetType(cbTypeName & "," & asmName) Dim args2() As Object = {da} Dim cb As Object = Activator.CreateInstance(cbType, args2) Return da End Function
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.