I am working on a book selling website using ASP with an Access DB.
Basically i would like to have an image of each book in the DB to be displayed upon request in the website. So I guess what i would really like to know is
1. Can i store .jpg or .gif files in an Access DB?
2. Does it make sense to do this?
3. Would it be better to have some kind of pointer in the DB to a place in the file system where the image is stored? .......
I want to upload image files (jpg) into a sub-directory of a website root directory using a web interface allowing the user to browse their drive and select the jpg file to upload.
Also, is there a way to parse the information from the jpg file and insert the information into a SQL database table which would hold the file name, image height, and image width?
I'm new to handling binary files, so I'm not sure how to accomplish this?
I have a wast databse of records, where there are so many Images assiociated with each record. I store the Image paths, record's primary key in the database and retrive them as and when required to display the records and the necessary images corresponding to the records. the image path as of now contains a relative path from the root directoy.
Problem:
The main problem is ..what happenes when the hard disk is full and if i add another harddisk.. and add images into that new hard disk. how will i be able to address the images?? as they are in a separate hard disk hence cannot be addressed relative to the web site's root directory..
How to secure images,Docs from anonymous preying Eyes?
Ok I looked around and read some articles about using a db to store images and stuff about having to save it as a blob. How exactly would you input it though? Is is the standard "insert" query?
Also, if I don't plan to use the image itself in the db (to reduce slow down) and store the path instead, would it still be easy to load it into a webpage as if it were to be in the db? Or should i just store it into the db?
I need some advice/ideas on how I could do the following:
I want to store articles which contain both images and text - like a writeup of an event - kind of an image and text blog.
I want to store articles in a database probably - at the moment I use access databases.
Clearly I could have the text of my article in one field and store images (or links to them) in other fields and then display all the images at the end of the article but what I want is..
to be able to make it to have text then a few paragraphs down have a nice right aligned image with text to the left of it and then some more text etc etc so it looks like a static, layout planned article.
What would be the best way to go about this? Can this be done by storing in a database?
1) I need to build an admin page that allows me to browse to the file that I want stored in SQL Server 2000 in an image field, have it uploaded to the server, and then stored in the db. I see this done all the time, so I don't think this part is too hard, but I'm not sure how to get the image into the db.
2) I want to display the image within a web page, so I would want to pull the image out of the db, place it on my web server in a certain location, and then reference the file in the HTML. How do I do that?
i have iis5. windows 2k advance server. I have many http sites on iis. One ftp site with folders protected with userid and password. e.g i have folders at
now if i try to diplay image on asp page as http://www.mysite.com/displayimages.asp
in displayimages.asp page i give url to images file as http://www.mysite.com/images/usa/logo.jpg
i was asked to enter userid and password. I mean to say, How can i display images on asp pages from the users, whom have posted images to their ftp folder.
I have a situation which i am sure has arisen previously. But for the life of me i cant figure out how to get this to work.
I have a directory setup like this:
Site1 - www.site1.com Asp - Images - Site2 - www.site2.com Asp - Images -
The problem that i am having is i cant get site 2 to display images from site 1 using the virtual path '../' as this only takes you to the root of site 2 and wont let me out of it.
I have tried to use the full path of http://www.site1.com/Images but this seems to take an a really long time to load the images.
Is it possible to go outside of this root directory using some kind of trick? I dont want to copy the images accross to site 2 either as there are actually hundreds of sites that will be referencing site1's image folder and it is updated regularly.
I was thinking of putting a virtual directory in site1 thatpointed to the image folder in site2 but i couldnt get that to work.
I need help with storing the number of times a site get hits, and have the value stored in a text file, i could only get part of the code working , Code:
I was looking for a method to store the contents of text file within a variable. So far I am able to read the text file and output the results using the write method. Going a step further I also wanted to replace a particular string within those same results using the "Replace" function. This works as well.
My question, how can I store the final result that write's to the screen so that I can reference it later. If you run this code, I basically want to take the verbiage that displays on the sreen and place it into a variable. Code:
I'm coding a page where you can download a lot of different files( 100-1000) but I don't want to code each file(linking and all) it would take weeks to do that. I tried with a database and asp code rding the databse but it not saving a lot of time since I got to complete the databse.
I wanna know if we can code with asp something to automaticly read each file and list them in html so I dont have to code 1000 x the samee thing.
I want to know is it possible to upload file into specific directory? Actually I already find how to upload a file, but I can not choose/browse where I want to store/save the file.
does any one here know of a good way to to determine whether or not a given path is a directory (e.g., "c:mydir") or a file (e.g., "c:mydir myfile.txt")?
i started attacking this problem by using filesystemobject to check whether or not a directory existed for the path. if so, it was a directory path. if not, i checked to see if a file existed for it. if so, it was a file path. Code:
Currently I am developping a internet "directory browser"
My page 'default.asp' has following entries:
CurrentPATH = Request("MyLink") Set oFSO = CreateObject("Scripting.FileSystemObject") Set oFolder = oFSO.GetFolder(CurrentPATH) Set oFolderContents = oFolder.Files
this works fine with 'default.asp?MyPath', where "MyPath" stands for i.e. c: emp but NOT with 'default.asp?MyFile', where MyFile stands for i.e. c: empfile.txt
Is there a way to determine if the link contains a file or a path? Of course you can check for a dot (after dot, normaly it is an extension, thus a file), but I want to have it possible also to have dots in my directories...
If I don't set a vritual directory for the new application on the IIS (simpley copy the new application to a parent virtual directory), the new application's Global.asa file won't work. Right?
I have a folder with eight or ten files that can be displayed in a browser. I need to display the file with the latest creation date. I imagine there is some kind of ASP function that could like at the filename's date and pick the file that meets the criteria. How can I do this?
Set fileSystem = Server.CreateObject( "Scripting.FileSystemObject" ) Set file = fileSystem.OpenTextFile( "config.xml", 1, False )
It's saying that 'config.xml' doesn't exist. How can I reference this file? It's in the same directory as the file with the above code. Do I need to build the path somehow?
I used to have a little ASP file (classical ASP) that would show me the total file size used per directory. I didn't need it for many years and now that I do I seem to have lost it.
Does anyone have an classical ASP file/script that will loop through your filesystem and shows the total Mb's used per directory? I could write it myself I'm sure, but if someone has a script like this ready it would save me quite some time.
is there a way in asp that you can prepend a file to the beginning of page you access in a directory? i'm not talking about the include statement because you have to put it in on everypage manually. i know you can do this in cold fusion, but i don't know how to do it in asp or if its even possible.
Can someone please give me advice or help me ...I don't know why the include file / image doesn’t work. What did I do wrong?
Here is my project:
In the wwwrootmyproject has the includes folder, images folder, and index.asp. wwwrootmyprojectindex.asp wwwrootmyprojectimages wwwrootmyprojectincludesheader.htm wwwrootmyprojectmathcalculas.asp
I create an header.htm page and save it in the includes folder. Because, I want to use the header.htm page in other places.
The images folder contains all the images in there.
I have a tbl.pictures on my website, several of the columns have refferal links to images. Having read through another link on this site, apparently it's the best way to do it. (Keeping the images in file rather than on/in the database)
My problem is that when a photographer deletes a photograph from my database the image files remain on my server. For the moment its ok but long term when they delete the record I would also like the images to removed from my server.
I would like to know ho to validate a file name when uploading via asp. I need to upload 2 images and the file names must be the same...
1) browse for 1st image. 2) image path and file name appears in text box i.e. IMAGE1.JPG 3) browse for 2nd image. 4) 2nd image file name MUST match the file name in the text box of 1st image i.e IMAGE1.JPG.
I have a form mail script that sends an email and then writes to a text file using Server.CreateObject("Scripting.FileSystemObject").
The problem I am having is that the information needs to be saved in a Password Protected Directory. When I try to save the info it gives me a permission denied error.
I had my hosting company change the permission on the directory and the script was working ok but now it isn't.
Is there a way to pass the username and password in the script so I don't have to worry about the hosting company messing this up?
I have 2 web servers both running win server 2003 with iis 6.0. On my PROD server I have a virtual directory called CONV. It points to a folder on the C drive of this PROD server.
On my TEST server, I defined a virtual directory called CONV. It points to a share called prodservernameCONV. Note that the share name is the same name as that of the virtual directory.
Using IIS on the TEST server, I can navigate to this CONV virtual directory and via right mouse, click EXPLORE. I see all the content I should but when I try to doubleclick on a file I get a message saying "Security alert" - "your current security settings do not allow you to perform system commands on this item".
I've tried everything I can think of on the security settings for the physical folder on the PROD server. I extended EVERYONE from READ, etc. to FULL CONTROL. I added the user called INTERACTIVE and gave it full control. In short, I am stumped and guessing now.
Basically, I just want to avoid duplicating all the data files on my PROD server over to my TEST server.
I have written a script to update user information in the Active Directory using ADSI. Here is part of it:
Set User = GetObject("LDAP://<GUID=" & GUID & ">")
User.Department = DepartmentName
User.SetInfo
Set User = Nothing
This works fine unless DepartmentName is an empty string ("").
Then I get error 0x8007200B: "The attribute syntax specified to the directory service is invalid." This happens with all the attributes I have tried, including TelephoneNumber . Do I need to delete the value of the attribute instead of setting it to an empty string? If so, how do I do it?