Recursive File Search Function Bug
I've recently made a recursive sub in asp to search all folder and subfolders of the map "file" for a certain filename. It will list all results and show a link.
Now there's still a bug. I can't place files in the root because this script won't find 'em. The root i mean files.
If i replace the empty dir with Server.MapPath("") it will show the files in the root but it will show 'em twice. Code:
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Problem With A Recursive Function....
I have a table inside access DB built like a tree, every record(=node) is a "title" that has a 'name' and 'paret' fields (and some other fields that are not relevant). I'm simpley trying to print out all the tree's records but I keep getting only a path from the root record to the first leaf. I have a recursive sub called 'deleteTitles' that needs to perform this task. The var 'currentTitle' is the root node. On every iteration of the sub I print one son of the current node 'T'. Code:
Recursive Function Problem In ASP
I have adapted the code below but it gives me an error "exception occcured" after the first recursion. Any ideas what can be done to make the following code work. Code:
Database - Recursive Function Calls
..:: The Specs: MS Access 2000 (host charges extra for SQL/MySQL) MS Windows Server 2003 (prod) / MS XP SP1 (dev) ..:: The setup: The database has been setup with two tables; tblDownloads tblCatagories Each "download" consists of a catagory field that corresponds to fldID in tblCatagories. Each catagory, where the catagory is a parent, has a parent field of value: 0 and each child, has a field with a value corresponding to the fldID of it's parent. Code:
Want Recursive SQL Query Function To Generate Breadcrumb Navigation
I'd want to make a custom class that will generate breadcrumb navigation for my site via a recursive query, e.g. Home > Page1 > Subpage 1. I've structured my database with hierarchical parent/child relationships. I'm using ASP VBScript, and I have a table structure similar to the following: Code:
Search Function
i am wondering how I would go about making a search page on my site??? Basically, i want a field in my SQL dbase called keywords so i can put general words in i.e. Apple, Bannana, Kiwi etc. However, I want the page to be able to do 2 thngs: 1. If someone types "APPLE" the page will display all the records where the keyword is entered in the field 2. If someone types "Apples" and "Bannanas", the page will display all the records where the keywords is is entered in the field.
Search Function
i have a site that shows my dvd collection i have this call from the database and i want to add a search function in the same page (not the datbase) so when someone wants to search for say "Shrek" it will bring up the search results on the main page and should show "shrek 1 and shrek 2" , Also in the same light if someone searches by Actor all the films that actor has been in will appear on the main page I have created the Form Form in Dreamweaver Code: <form name="form1" method="post" action=""SELECT * FROM movies WHERE title = " & request("q") & ";""> <input type="text" name="textfield"> Search </form>
Search Function
Does anyone know of a tutorial or other source that addresses the following problem: I have a textbox (txtSearch) and a drop down box.I want to enter text in the textbox, and then select the table column to search using the drop down box i.e. Search for: Johnson (txtbox) Search by: Surname (ddbox)
Search Function
I have a page where I enter a keyword and I search for that keyword in my database. I want to highlight the word that is/was searched for in the results. My results consists of values out of varchar and text fields.
Search Function
i have numerous tables to search through for a 'site search'. some of the searchble fields have html embeded within so after some quick referencing, saw I can use the regExp function to strip out all the HTML leaving only the raw text. what is the best method to remove alot of words such as "a", "and", "I", "so", "that", "this" ...etc ... from the search string leaving only keywords essentially per page/field that will be searched within for the occurance of the users' input text through a input field. The idea being to only return the suitable records without alot of rubbish.
Search Function W/out A Database?
I would like my ASP-based site to have a search box to bring up a list of relevant pages according to user-defined search criteria. Q: Do I need to have a d/b like SQL Server 7 at the back end to process and match the search string? Or can I do w/out a d/b somehow and run a search, and somehow still bring up the same results? If a d/b isn't necc, pls. advise on webpages where I can find such ASP-search codes.... TQ!!
Search Engine Function
i want to do a search function for my project, my project is allow user to upload file into my server and sharing among each other,i need to do a search engine function to allow user to search for the file that they want, can i know there a function can search through the server's file implemented in asp?or may i know there any open source search engine function coding for me to refer?
Database Search Function
I have a page that uses the data from the previous pages form to search the data in the database and dispaly any matching results. On doing so i get this error: Error Type: Microsoft VBScript compilation (0x800A03F9) Expected 'Then' /IT/searchresults.asp, line 20, column 15 If Request.Form"(Typesearch") = "computer_name" Then My statement has a then in the statement already.
Access Search Function
I have a neat database running and im trying to place a search engine thro it. I have quite a few tables, BUT i can only get the query in one table. ie Code:
Advance Search Text Function
For example: The text to be searched is the following: Text 1: Hello world! what a nice day today. But I like to sit in front of computer and doing some web design. Now I have encountered some technical problems and would like to get some helps from the experts. Text 2: I like fishing. Text 3: Baseball season is over. Text 4: The winter snow storm is coming. Search Keyword: snow. Search result is Text 4 Search Keyword: I Search result is Text1 and Text2 At the end, the key word should highlighted with a different color in the paragraph. How would I do about this?
ASP: Code Search Function For Chinese Site
Got a chinese website (has both chinese character and english), got to code search function for it, search for keywords in the webpages (htm/asp) search in english it works, no problem search in chinese it doesn't - it always return "nothing found" you guys any idea?
Recursive Calls
I have implemented a logic for my requirement with a recursive call. The logic is I need to get IDs from database for a scenario. There are corresponding records for each ID. I need to store these IDs in an array variable. Then I need to get (dependent)IDs for the fields in each ID. There may be morethan one dependent per each ID. I append these IDs to my array. Like this it goes. The problem is if there are many levels like this, the number of database cursor count is reaching to maximum and I'm getting the error {Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC driver for Oracle][Oracle]ORA-00604: error occurred at recursive SQL level 1 ORA-01000: maximum open cursors exceeded } each recursive call runs a SELECT query. Can any one suggest me an alternate solution for this ?
Recursive Categories List
i am working on ecommerce site and would like to display the categories (and sub categories) from the db recursively, i did it but i also want to add the level of each category like : main_cat_1 (level 1) --------sub_1 (level 1_1) --------sub_2 (level 1_2) ------------sub_sub_2 (level 1_2_1) ------------sub_sub_2 (level 1_2_2) ------------sub_sub_2 (level 1_2_3) --------sub_3 (level 1_3) main_cat_2 (level 2) main_cat_3 (level 3) --------sub_3 (level 3_1) and so on ... how can i do that ?
Cursor Count Problem In Recursive Calls
I'm using the following function, which uses a recursive call. every time when I get a conf it opens a record set. So increases the cusor count. Some times I'm getting the following error: Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC driver for Oracle][Oracle]ORA-00604: error occurred at recursive SQL level 1 ORA-01000: maximum open cursors exceeded. How can I avoid this ? Code:
Search A Pdf File
I do create a directory to save a lot of pdf file with different folder/sub folder. I am thinking of using a asp page for user to search on a file that they are looking for. User only key in either no a part or full file name and the page will search the directoies and display the file name as link to let the user click on it.
Search Dir For A File
I need to create a vbscript that will search a specific directory for a file with the current date, and if it exists then send it as an attachment via email, and if not, send a different email. The script will run everyday and search the same directory everytime for the current date's file.
File Search
I am trying to come up with a web tool that can do a file search that matches user input within a directory and also its sub directory. I did some research and think FOS can do the thing, but need more help on it. Any idea or it would be great if anyone can supply me a function or a subroutine?
Function For Finding File Name
i have a person upload a file, that is done, then i want to email the file. I know the location, but not the file name. How do i find the file name to attach to the location addy? example: objEmail.AttachFile("d:greguploads" & filename & """) , "SNAIL_File" , 1
File Object Search
what im trying to do is write out certain files that our in a current folder. For example I have a folder called images and i have about 20 sub folders inside of the images folder. What i want to do is search the Images folder including all the subfolders and write the name and path of where ever the image was found inside of the images folder.
File Content Search
I am trying to create a search engine to allow to do a keyword search on a file content. The files are in Word, TXT, and PDF.How can I implement this?
Search A .txt File With A .asp File
I would like to search a text file on my server and then alert me on if the current date exist in that file. Any one have any code that searches text files.
Site Search: Reading Text File ERROR
I have to make a site search function for my website. User types a keyword, and the search function searches through all the static pages for the keyword. The result of the search has to display the URL relating to the keyword, which the user can click to read the contents. I had no idea how to go about doing it, finally I thought of using a textfile containing the word, and its related URL in the format: Code:
Function Inside A Function
Can I define a function inside a function. e.g; function abc() function xyz() ....some code..... End Function End Function I googled this but can't find any related topic.
File System Object - Check If File Is Being Read
I have code that loops through a directory reading files.. now the problem is that files are constantly being uploaded and I only want the file system object to read those that are finished being uploaded. How can I check the properties of the file to see if it's in middle of being written before i read the file?
How To Find Excel File Width And File Version
It works if the file in on the server side, how to use the component (DSOleFile) with the file on the client side? Also how can I calculate the width of the file. (Page set up - Landscape or porrait). Code:
How To Do Online Streaming Audio File Or Video File?
I need to do online streaming multimedia file on my web portal, just like those online portal that selling MP3. User need to click on the preview link to stream the audio file to listen before they decide to buy the file or not. How do i link my audio file in my web server to allow it to be stream? Totally lost on this function,
Asp Function
I am trying to call a function in asp to check to see if a varibale has a value stored in it if there is nothing wite the value NA into it. My code is <% Function NullValues(userField) if userField = "" then userField = "NA" end function AccountNo = "" Name = "sam clowes" email = "" AccountNo = (NullValues(AccountNo)) Name = (NullValues(Name)) email = (NullValues(email)) response.Write AccountNo & "<br>" response.Write Name & "<br>" response.Write email & "<br>" %> When I run this code ALL the variables are blank and nothing is output
XML/XSL & ASP Function
the function <% Dim objXML, objXSL Function ShowXML(strXML,strStyleSheet) Set objXML = CreateObject("MSXML.DOMDocument") Set objXSL = CreateObject("MSXML.DOMDocument") objXML.load(Server.MapPath(strXML)) objXSL.load(Server.MapPath(strStyleSheet)) Response.Write objXML.transformNode(objXSL) Set objXML = Nothing Set objXSL = Nothing End Function %> calling the function in an asp file <%Call ShowXML("http://msn.foxsports.com/feedout/syndicatedContent?categoryId=142","nhl/xsl/news/teamNews.xsl")%> the errors 1. the http:// part 2. and the ? mark the error message says that the path has been typed wrong.
Function
the user can key in variable A and B then C is auto generated by C = A / B so how and where should i write the C function??
XML Value Into ASP Function
Possibly a very simple question but how do I get a value out of an XML document so I can play with it in ASP E.G: <Name>Tom</Name How do I pull the work tom into asp
Mid Function
6408373-SALE-11/1/2007 From string, i want to extract "SALE" How to do it using mid and Instr ? Also, 6408373-DECLINE-11/1/2007 From string, i want to extract "DECLINE". How to do it using mid and Instr ?
Now() Function
I am using the now() function to be displayed on an email after a form submission has been sent. The problem is that the server is not in the same timezone as I am for the result. How do I adjust the hours on the now() to allow for this please ?
Sub Or Function
I know the basic difference between a subroutine and a function is a subroutine performs a task and a function performs a task and returns a value. The Call keyword is required when using parens with subs with more than 1 parameters. Parens around values passed are ByVal vs ByRef and is a waste of processing if passed ByRef for no reason. I am told there is no reason to ever use a subroutine as a function can be used even if it doesn't return a value. While this appears to be true, is there any reason why it's ever a bad idea to use a function, instead of a subroutine, that doesn't return a value? Are there memory, performance, etc. issues?
ASP Function
I am trying to locate information on how to call a sub within VBScript on an ASP page but I can't locate generic information. What I want to do is generate a page that will stay up but the information on it will change based on a series of drop down boxes. I need the first drop down box to call a second dropped down box based on the state that is chosen then city and so on.
Asp Function
I have a column in the table which contains 2 full names seperated by "&" (e.g: Joe Smith & Jeff Scott) I want to display only the first names of the whole record in an asp page. Is there an asp function using which i can do this?
Mod Function
im using the mod function to create a calendar for me, which everything works perfectly, all is totally well with that! but...when i use the mod function it churns out this loooooooooong string which is the whole table... if there is some way that i can insert hard breaks IN THE CODE ITSELF.
NaN Function
I used to be quite an experienced ASP programmer but I haven't used it for a while I’m trying to do something that I remember as very simple I'm trying to check that the value of a form text box is numerical using the isNaN function. The code I am using is: <% quantity = Request.Form("number1") if isNaN(quantity) = true then Response.Write "Your input was not a number" else Response.Write "Your input was a number" end if %> All I get is a NaN type mismatch error.
Contains Function
Is there a function to check to see if a string contains a space Thanks
Mid Function
I was just wondering when using the mid function how does the assigment work when the length is longer then string itself? For example test = mid(12345, 1, 10) What would be the end result of test?Would it be 0000012345 or 1234500000 or 12345?
Mid() Function
When I create a single character string var str = "A" 'convert to ascii num = asc(str) Response.Write num ' 65 shows up 'when I have a whole string str = "hello" str = mid(str, 1, 1) ' return 'h' num = asc(str) 'I get an error: Invalid procedure call or argument:'asc'What can be done to fix this?
|