I have been asked to store text files in a DB as an OLE Object, (don't ask why just what they wanted) Anyway, I have got the files going into the DB. But now I am stuck on how to retrieve the OLE object, convert it back to usable text, and dumping it into a variable, to use in my ASP code.
I have googled response.binaryread, binarywrite, and other such keywords, but have come up with a blank of this particular problem, can anyone advise me on the correct approach to the above.
Totalperdayleads contains 2 & totalleads contains 11. now inst_register table contains per_day_download,download_Date fields in per_Day_downlaod is initially 0 & it will be go max upto Totalperdayleads i.e.2 for one day then i have to compare date with download_Date from inst_register & again for next day 2 Totalperdayleads this way i have to allocate totalleads in per_day_downlaod field of inst_register.
I need to write some special logic in my ASP.NET page. If the page is visited by a human visitor, I want to show an advertisement. If the hit is from any search engines, I do not want to show the Ad.
How can I identify if the hit is from a human visitor or search engine? Is there a server variable I can compare with the list of available search engine names?
I'm trying to write a script to countdown the number of hours and minutes until tomorrow. So far, this is what I have:
Code: <% response.write(dateDiff("h",now(),date+1)) & " hours and " & dateDiff("m",Time(),date+1) & " Minutes " %> The code above correctly displays the hours until tomorrow. but it's not displaying the minutes correctly. It's displaying the total minutes until tomorrow. If there at 4 hours left until tomorrow it's saying "4 Hours and 240 minutes."
I am trying to plot the days off employees have taken in the selected month visually using the following code. The code below takes a long time to execute typically about 8-15 secs each time. Code:
is there any component to make it.. i want to make user registiration page.. in this page i want to place a image which has a text and a user must be type this text to a text box and after that i will check the textbox value and image text value.. how can i make it.. do i need a component. if there is a component what is its name .. and i need a free one...
I would like to dynamically add a text as a watermark on images.
I managed to do that with aspsmartimage but as the watermark is added when the image is sent to the browser, it takes too much ressources on the server, due to a big number of images to diplay simultaneously.
Is there a way or an other component to do that more efficiently. I can't add the watermark when uploading the file because it has to be written when the image is displayed.
I'm writing a script lately to write some records into a text file for backup purpose. But may i know do asp allow update for the text file? Cause i dun want it to overwrite my previous records.
I'm writing data from an access db to a text file then emailing the text file. Everything works fine but it needs to tab deliminated. Can some one post the code for a "tab"?
Can this be done? For example, in the line below. There may not always be a & objRS("ShippingAddress2") and I'm wondering if there is a way to use an if/then in there some how. If there is no data in that field then I need to pass over this part completely & objRS("ShippingAddress2") & "|"
I'l have several instances where I need to do this Code:
i found this piece of code from a site and it claims that you could create a text file into directory "c:test.txt" and writes the line Hello world in it. Code:
I'm having a hard time to open/write to a txt file from a .asp, the code is right, but, looks that the iis 5.0 is messing with the file system.
once the execution gets to the point of : Set filetxt = filesys.OpenTextFile(sFilePathAndName, ForReading, False)
the browser just hangs forever, If I do the request to the same .asp several times then the IIS hangs, and can not even stop the service(a bug in IIS). Code:
I have an application which was successfully writing data from submitted forms to a text file in a directory - in this case:
/data/findata.txt
This was fine because the forms lived at the root level with this directory.
Since then I have added enabled the forms to be used on subdirectories :
/subdirectory/myform.asp
I've used the same code for server.mapparth("data") etc - but instead of locating the directory at the root of the server called "data" it looks to the current directory- doesn't find it and creates another! eek!
What I need is a way to say "right, it doesnt matter what level you are at at the moment, always look at the root level /data directory"...
This has to be fairly dynamic - on the development server here its got a different file structure than on the live server (ie, it lives another level down again on the physical drive)...
Anyone got a good idea on how to look back up?
I do have one way to test which level they are at - but I feel that its a bit 'weak' - I have an ID that tells me if they are working on the upper or lower levels (ie, anything other than 1 is a lower level) - whilst I realise I could use this in the test I'm not sure if its going to be 100% fool proof to base this criteria on this ID.
Therefore I was hoping for a better way using the server.mappath etc...
I'm having a hard time to open/write to a txt file from a .asp, the code is right, but, looks that the iis 5.0 is messing with the file system.
once the execution gets to the point of:
Set filetxt = filesys.OpenTextFile(sFilePathAndName, ForReading, False)
the browser just hangs forever, If I do the request to the same .asp several times then the IIS hangs, and can not even stop the service(a bug in IIS).
Does anyone know if it's possible to write and retrieve variables from a text file??
I know how to use the FSO to create text files and write data to them etc. I just don't know how to write a variable to a text file, and retrieve it at a later date??
I would like similar functionality to a cookie. The reason I can't just use a normal cookie is because the data needs to be permanent and I can't risk the cookies being removed off a users machine.
- a form that updates a text file. - for example, in the form I have two fields, title and story. then, this write to a textfile (i.e. theinfo.asp). the update.asp file looks like this:
- so, essentially it is creating an asp file with two variables. - this works fine, it updates the file and i can call these variables in other pages. however, when i call these variables into a form : old versions of the variables populate the form: Code:
i had a vbscript that will read the text file from the bottom to the top, and after reading the file, it will be displayed in the screen, and the code look like this: PHP Code: Code:
I am having a newbie problem trying to Response.Write a static text string, 'Read More' into the output part of a hyperlink. I have tried my way of doing it but it doesn't work.
My code is below (the text string which I want to Response.Write is highlighted in bold):-
Response.Write ("<a href=""dummies_news.asp?ID=" & rsCTD("ID") & """> Read More & ">") Thanks for the help in advance - should be quite simple to solve, I'm sure!
I'm looping through the source code of an HTML page, looking for links, grabbing the source of those links and saving each one in turn to an HTML page on disk.
This is working fine about 70% of the time, but sometimes it falls over when I try to write the source code as a text file to disk: Code:
how to write a text file to a mapped drive or network drive. In my script, I’m currently writing the text file to a local folder on the server temporarily until I can figure this out.
So far I have tried to use the mapped drive letter, network path, etc. to get this working. I believe all the permissions are in order (I hope) as well. No matter what I have tried, I just get a Path Not Found script error. I know this has to be possible, just I’m missing something … probably something right under my nose but I just can’t figure it out.
I have a site which uses javascript in an asp document to draw the content for part of the site from an external .js file.
I want to be able to have a web interface where i can input text, and convert then save the file to the *.js format. This would involve adding "document.writeln(' "to the start of each line, and " ');" to the end. This would also involve adding <!-- to the start of the whole thing, and //--> to the end.
Would this be possible, and if so how would I go about doing it, are there any scripts out there that I have missed, or is there a simple way to do it manually?
Here is a written descripton of my webpage. One frame split down the middle. The left side is the menu and the right displays what is selected from the menu.
the user selects from the menu and on the right, clicks on "download image" link. the user is presented with a download dialog box. The user saves the image and when it is completed goes and selects another item from the menu. But this time nothing happens.
It is like i have to refresh the page before anything works again. It is like it is stuck on the ASP binary stream file that forced the download.
I am having trouble trying to output an image using Binary.Write. I have a page which displays a record. One of the fields is an image and I want to display this on the page.
My question is this: Is it possible to use the Binary write command i.e. Binary.Write("MyDatabaseField") on the same page that I want the image displayed on?
If not Is there a way to nest it inside an image tag as follows:
I'm working on a client project where i'm importing some data from a programme to a sql database.One of my fields contains a value which is created by bit flags Within this value are 10 bit flags, and i need to find out the value of each flag. An example of one of the bit flags is 0x0001
I'm guessing that it is to do with Binary and I need to apply a bit masks, but that's where my expertise ends.
Does anyone know of a "pure ASP" upload script that does not use the binary read? I am sure many people are looking for this as well..as you cannot use the binary and request.form in the same script. I am trying to integrate a file upload into an already built script using request.form.