Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#29296 - 09/04/2001 13:31 ASP based search for Emplode CSV file
kazama
enthusiast

Registered: 11/11/2000
Posts: 202
Loc: Boston, MA
I have been working on this idea for a while but it is still not complete. What I want to do is provide a ASP page to everyone which will read in the CSV file from Emplode and allow you to search against it. I have half of it done where it will take the CSV file and output the reults in a formatted way. You can see that at http://www.gregdemetrick.com/empeg_search.asp. Now I am trying to develop the RegExpression searches in VBScript to handle the searching capasity. Writing this in Perl would be much easier but I am also trying to learn how to do this in VBScript. Short of writing a regExpression comparison for each element I want to search is there some easier way to do the comparison? I tried using StrComp but that will only do full text searches and not subStr searches (i.e. if I search for "Love" I get "Love by The Sundays" but not "Love in an Elevator by Aerosmith" Ideally, I want both which is what a RegEx will do). Thanks for your help!!!

Greg



Attachments
28449-empeg_search.asp (225 downloads)


Top
#29297 - 09/04/2001 13:44 Re: ASP based search for Emplode CSV file [Re: kazama]
tfabris
carpal tunnel

Registered: 20/12/1999
Posts: 31597
Loc: Seattle, WA
This is pretty nifty. But you have been reading about the features that are upcoming in version 1.1, haven't you? Some of my FAQ items mention that searches will be available in Emplode 1.1.

I just didn't want you wasting time re-inventing the wheel. If there's an advantage to having an ASP version that works on CSV (as opposed to just searching in emplode), then by all means, carry on.

___________
Tony Fabris
_________________________
Tony Fabris

Top
#29298 - 09/04/2001 13:53 Re: ASP based search for Emplode CSV file [Re: tfabris]
kazama
enthusiast

Registered: 11/11/2000
Posts: 202
Loc: Boston, MA

I just didn't want you wasting time re-inventing the wheel. If there's an advantage to having an ASP version that works on CSV (as opposed to just searching in emplode), then by all means, carry on.


I see a need for it personally because it gives me the ability to search the database without having the empeg connected. Also, it now gives me global searching when I don't have my Empeg near me or if my friends want to peruse my CD collection.

Greg


Top
#29299 - 10/04/2001 14:14 Re: ASP based search for Emplode CSV file [Re: kazama]
mtempsch
pooh-bah

Registered: 02/06/2000
Posts: 1996
Loc: Gothenburg, Sweden
I tried using StrComp but that will only do full text searches and not subStr searches (i.e. if I search for "Love" I get "Love by The Sundays" but not
"Love in an Elevator by Aerosmith" Ideally, I want both which is what a RegEx will do). Thanks for your help!!!


InStr(start_pos, str1, str2, compare_method) is probably more what you're looking for
than StrCmp (hope I recall the arguments correctly). Not real regexps
(does any one know of a package that implements regexps in VB?), but
it'll let you know if a string exists somewhere (and where) in another string.

However, you might consider linking the CSV file into a database and then
letting your ASP pages talk to the database, making the DB do the searches etc.
The LIKE function will give you regexp like string matching in for instance Access...

/Michael

_________________________
/Michael

Top
#29300 - 11/04/2001 11:31 Re: ASP based search for Emplode CSV file [Re: mtempsch]
kazama
enthusiast

Registered: 11/11/2000
Posts: 202
Loc: Boston, MA
Not real regexps
(does any one know of a package that implements regexps in VB?)


The latest VB version has a RegExp object built into it but this is how you use it. I think I pulled the update from MS directly but will look for the link for ya.

Greg
----------------------

dim objRegExp, objMatches

Set objRegExp = new RegExp
objRegExp.Pattern = "\some pattern\b"

objRegExp.IgnoreCase = True
set objMatches = objRegExp.Execute(seriel)

if ( objMatches.Count = 0 )then
errorMsg = "Error: You have not provided a valid match for the expression"
end if


Top
#29301 - 11/04/2001 12:14 Re: ASP based search for Emplode CSV file [Re: kazama]
mtempsch
pooh-bah

Registered: 02/06/2000
Posts: 1996
Loc: Gothenburg, Sweden
I think I pulled the update from MS directly but will look for the link for ya.

Thank you - I found it among the Project -> References.
Somehow I've managed to miss this one totally...

/Michael

_________________________
/Michael

Top