Im trying to parse data from a .mdb file to a com object [.dll] file. how to i get this.?
Then the .dll file perfoms the required calculations/conversion on the data parsed and displays the result to an ASP page.
I used to have some static htm files which used to display data. There is a calling asp file which used to do something like below
if Request.QueryString("PageName").count = 0 then strPageNameHtm = "toc.htm" strPageNameInc = "toc.inc" else strPageNameHtm = Request.QueryString("PageName") & ".htm" strPageNameInc = Request.QueryString("PageName") & ".inc" end if strPageNameHtm = server.mapPath(strPageNameHtm)
strPageNameInc = server.mapPath(strPageNameInc) 'response.write(strPageNameHtm) set fs = server.createobject("scripting.fileSystemObject") set f = fs.openTextFile(strPageNameHtm) strSPDHtml = f.readall
The strSPDHTML info used to be displayed using a response.write(strSPDHTML). This allowed the static content to be loaded up.
I switched the static pages to be asp pages having the content come from a database. I would still like to maintain the controlling page logic. Can I modify the above section of code in anyways to access the asp page content
What I want to do is simply upload a file and read the information in there. I don't want to save the file onto the server or anything difficult.
My problem is I don't know how to recieve the file once the user clicks on the Submit button. So far I have the Enctype as "multipart/form-data" and an input type as "file". That's it.
I'm working on a project where there are just under 1300 course files, these are HTML files - my problem is that I need to do more with the content of these pages - and the thought of writing 1300 asp pages to deal with this doesn't thrill me.
The HTML pages are provided by a training company. They seem to be "structured" to some degree, but I'm not sure how easy its going to be to parse the page. Code:
I have a site that pulls in XML data from an external third party and I need to parse it in my ASP page.
Could someone please suggest examples or online resources where I might learn how to do this? Everything I am Googling is confusing me with DTDs, XSLTs etc.
I need to use asp code in a text file (.txt extension). But when i try to call the text file (with asp code inside) in a browser , it simply displays the asp code i have written on the file. I know that i can set options in IIS administrative panel so that my text file is parsed as asp. But assuming i have no access to the web server, how to do this?
I am trying to create an application feature for an inventory database and I am wondering about the most efficient way to process the updates. Here's the background information: Code:
I am using the File System Object to create server side cookies and part of the Function that I am writing deletes a file but I am getting a permissions denied error on that line of code.
I am using Integrated security only on this site but how do I get the IUSER_Machinename account to work with Integrated Security?
Im trying to do something very simple with the file object. I try to access it but when I open the page through the browser my server doesnt seem to respond...it just wont load the page, much like what happens in an infinite loop, the status bar slowly moving up forever. I would be very grateful for ANY suggestions you may have to the problem. Ive attached my code below,
SET objFSO = Server.CreateObject("Scripting.FileSystemObject" ) SET objFile = objFSO.GetFile(Server.MapPath("log.txt" )) Response.Write("log.txt was last modified " & objFile.DateLastModified) SET objFile = NOTHING SET objFSO = NOTHING ...
How the heck would I go about saving an object to file? Put would be perfect, and can basically save everything except objects - how do I save an object if I can't use put?
I have a server which has 100 template websites on it, each with unique domains. This may grow upwards to 500 websites. As I have been publishing websites to the server now and then I come across a bug in some code OR wish to enhance an aspect of the site. With the exception of a file or two, every site on the server has the same folder hierarchy.
Example, every site has a directory called toolbox. If I make a change in one file located in a particular site, can I write a script that some how woud copy that file and iterate through ALL sites inserting that file as necessary. I don't expect someone to show me how to do this, but rather tell me if it is a logical approach to managing such a large number of sites.
I have used File System object to write contents in a text file. But when i request the page, it just processing without completing the job.. The writing to text file is not happening.
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.
I have about 200 documents to which I need to write a header and a footer. Appending (the footer) is easy, but I cannot figure out how to write to the very beginning of the file.
when we use File system object in asp to read disk content of a server, in which sort order file system object reads and put all files in a list. well I put images in a folder and FSO reads and display on web page, I want to sort these images, for example by name or by date of creation.
How can I do that,If I have to do something with fso or, I can sepratly sort the listitem where fso stores the list.
I have a web site that uses NT authentication. It accesses a file on another server using FSO. The user has full control of that file yet when trying to access it via the website they get a Access Denied error. Shouldn't IIS use the current security context (which has rights to file) to access the file?
Can some tell me how can I search for a particular block of text within the file and delete it? Section of the file I want to change looks like the one below and I want all the lines starting with dteHolidays[ deleted?
/* INSERT HOLIDAYS HERE! */
dteHolidays[0] = new Date("01/01/2004"); // CHRISTMAS DAY dteHolidays[1] = new Date("04/09/2004"); // Good Friday dteHolidays[2] = new Date("04/12/2004"); // Easter Monday
I am building an upload script that overwrites any file with the same name, however the file could be a jpg, gif, bmp etc. Using 'fso.FileExists ' i can find if a file of the same name exists and remove it. The file will be saved as strMemberId.strFileExt. There is a possibility that file xyz.jpg may be re-uploaded as xyz.gif thus while the new image will be written to the folder the previous file will not be removed.
I am trying to find the best way of finding the file name of a file without the extension so I can delete any files that may exist with the same name but a have different extension. Is there a way of calling a wildcard in asp?
eg ' fso.FileExists(Server.MapPath("../tempfolder/" & strMemberId &".*" )) ' - tried this & several other combinations but it does not work.
The only other way I can see of doing it is to pass the file name into a string, strip the extension off it and then build an array to loop through the possible extensions but I am sure there is a better way.
I have script which is to check if a folder is existed. Even though the folder (virtual directory) is existed but the script objFSO.FolderExists() always return false. The script as following:
Set objFSO = Server.CreateObject("Scripting.FileSystemObject") If objFSO.FolderExists("../images/thumb") Then Set objFolder = objFSO.GetFolder(Server.MapPath(strPath)) response.Write("Folder exists") else objFSO.CreateFolder(("../images/thumb") response.Write("not existed") end if
if it's possible to tell if a file is already open. If I have a file on the server that I just want to put log information to, and I don't want to have collisions obviously. Can I tell if the file is open already?
I would have the code loop until the file has been closed and then go ahead and do its thing. Alternatives are welcome. Databasing is an option, but I'd like to know anyway if the file can be "read" for open state.
I have an include file - myUtilities.asp - containing 20-30 functions. Would it waste less ressources if the functions were in an object instead? There's about 20 pages including the file.
I have recently built a web interface to handle files on my network at work. There has been another system in effect for quite some time, and we can't phase it out just yet. In this older system there is a lot of data pointing to files in a particular directory.
PHP Code:
// doesn't work. mypath=" heserversomedirectoryThat Has. a Decimal" // works mypath=" heserversomedirectoryThat doesnt have a Decimal" Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.Getfolder(mypath) Set fc = f.SubFolders
Does using the File system object multiple times across the page to check if relevant files exist use a lot of memory/server resource etc?
if this were the case, I was going to change this to check a DB field instead. ie when a file is uploaded then this is logged accordingle in the DB, then it can be this field used to check as to whether to display it or not - or are either equally.
i am unable to create new folders using file system object. the createfolder method doesnt work....the progress bar becomes slow...and no folder is created....but the other methods such as folderexists work....i have also checked the permissions...all folders have read/write..