Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Searching txt Files


Reply
 
Thread Tools Display Modes
  #1  
Old 05-17-2004, 09:06 AM
vg19 vg19 is offline
Newcomer
 
Join Date: Feb 2004
Posts: 22
Default Searching txt Files


Hi,

I am making a Video Store Rental program for a project. Attached is my txt file with over 2000 movies and there status. What I want to do is havce a textbox and have the user able to enter a movie they want(even if they spell the title wrong or just enter one word) and display the results in order. However, Im not sure how to search the file to get this informaiton. Can anyone please guide me?

Thanks
Attached Files
File Type: txt MovieList.txt (68.8 KB, 2 views)
Reply With Quote
  #2  
Old 05-17-2004, 09:10 AM
lebb's Avatar
lebb lebb is offline
Disillusioned Code Poet

Retired Moderator
* Guru *
 
Join Date: Apr 2002
Location: Tennessee, USA
Posts: 12,808
Default

If they just enter one word of the title, that's not too complicated since you can loop through the file using InStr() to see if the word they typed is contained in the title. Looking for misspellings, however, is going to be quite complex. If you happened to be using a database that supports it, you could possibly use the SQL SOUNDEX() function; otherwise you might be able to take advantage of the spelling suggestions provided by a spell checker such as that found in Word, if you could rely on the target systems having that.
__________________
Laura

Ita erat quando hic adveni.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Searching for text files by content BlackDove File I/O and Registry 6 01-29-2004 12:45 AM
searching certain files thingimijig General 2 08-04-2003 05:53 PM
What do you want the master Tech Discussions 8 08-02-2003 09:13 PM

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->