Web Analytics Made Easy -
StatCounter Index Server Queries in ASP - CodingForum

Announcement

Collapse
No announcement yet.

Index Server Queries in ASP

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Index Server Queries in ASP

    I am looking for a way to query the property filename
    using ASP and index server such as,

    SELECT filename FROM scope('"d:\somedir\"') WHERE filename LIKE '*img001.gif' ;

    although the above syntax does not work.

    Any suggeestions?

  • #2
    Close, very close. Just replace * with %.

    Code:
    SELECT filename FROM scope('"d:\somedir\"') WHERE filename LIKE '%img001.gif' ;
    Check out the Forum Search. It's the short path to getting great results from this forum.

    Comment


    • #3
      This doesn't work either. It returns zero records... I've tried every combination of *, %, LIKE, =, etc... Nothing seems to be working.

      Any other thoughts?

      Comment


      • #4
        Make sure you've got the rest of your declarations right too, leave off the where clause entirely and make sure you get a result before using the where clause to narrow it down.

        I copied my own search page and tested that search by filename capability before my first post and it worked quite well for me.
        Check out the Forum Search. It's the short path to getting great results from this forum.

        Comment


        • #5
          There are 25+files in the directory and the initial query works fine, although when the where clause is added with

          WHERE filename = 'img001.gif'

          the query returns no results!!

          I have already solved this with a work around but I am still running though the complete recordset which if there were hundreds of files, that is a large recordset to parse, and this is the case in some situations where the queries can take minutes to complete.

          Comment


          • #6
            Maybe it's case sensitive, try it with "FileName". I know it worked for me so it's gotta be something really simple that's making it not work for you.
            Check out the Forum Search. It's the short path to getting great results from this forum.

            Comment

            Working...
            X