Downloading Files Stored In SQL Server

I am trying to download files from my database that I uploaded to it. I can download bmp, txt file but have not been able to d/l pdf files. I am able to d/l pdf files stored in the file system but not in the database. Any help would be great. Here is my code, I have hard coded the file to download for testing purposes.

Connect = "Provider=SQLOLEDB.1;Persist Security Info=False;User
ID=sa;Password=;Initial Catalog=INNB;Data Source=pompom"

Set db = Server.CreateObject("ADODB.Connection")
db.Open Connect....

View Replies


ADVERTISEMENT

Downloading Files...

The help is not very informative here, but it says, that it is possible to
download files, by using the 'a' tag. What I am trying to do, is create a
link, that the user clicks, which will download a file from the server. This
works fine for most files, but for things like TXT and HTM, they open in the
browser window. I want the 'Save As' dialog box to appear, instead.

If I use;
Response.Write "<a href='http://mydomain/myfile.txt'>myfile</a>"
I get the contents of myfile.txt displayed in the browser window. If I use;
Response.Write "<a href='http://mydomain/myfile.mdb'>myfile</a>"
I get the 'save file as' dialog box appear. How do I force the 'save file
as' dialog box to appear for ALL files

I tried using the 'FileSystemObject' and using the 'Copy' method of GetFile.
But this does not allow you to have a 'user defined' path to save the file
(which is pretty obvious, as this is the server side)... Is there another
function that I can use, or is there a property setting of the anchor tag,
that I need to set

View Replies View Related

Downloading Files With Dot

i m getting file not found error when iam trying to download a file with name "test..doc" the actual file name is "text." and the extension ".doc".does using DOT(.) got any limitations with file names? strangly in the development i was able to download such file with dots at the ending.

View Replies View Related

Downloading Files

I am writing asp page, based on the selection of the drop-down list I want to allow the user to download some files.for example

my drop-down list will contain a select control and a button

select control will have

File1.doc
file2.doc
file3.doc

e.g. when file file2.doc is selected and clicked on the button, the user should be able to download that file from the server.

View Replies View Related

Downloading Files

I'm developing a webpage in ASP and javascript for downloading s/w. I've set of files and when user clicks download I should zip all files and provide user to download .zip or .tar file. how should I do this?

View Replies View Related

%20 Downloading Files

why does %20 replaced with spaces in the file names iam trying to download? when i right click and save, the spaces are not replaced but when i click on the link and access through the http headers spaces are replaced with %20.

Moreover when i save file to the system, windows treats. "abc%20xyz.jpg" and "abc xyz.jpg" as a different files. why winodws is treating them as different file names?

View Replies View Related

Downloading Video Files

I have this weird problem when downloading video files on my ASP/IIS. My download code seems to be working since i can download every file except for video file ext. particularly mov and mpg. The download dialog prompts with the right file size except that it doesnt recognize the header or content type of the file.

View Replies View Related

Secure Files From Downloading

help me in securing a pdf file on my site. i want ot provide a pdf file that can only be viewed and not downloaded.

View Replies View Related

Downloading Files / Asp-error With ZIPs Only

I have the following problem:

working on a "downlad-module" within a larger website, i tried several methods for downloading-files to the user.

mabye some basic infos first:

the website runs on win server 2003, using sql server 2000-database; pages are written in classic asp. The idea behind is, that all possible download-files (flyers, brochures, some it-stuff.. means pdf, docs, exe, zip-files.. "standard-mixed-stuff, i would say) are of course stored outside the website-root and are uploaded using a cms.
for each file, the information is stored in a database (not the file itself). beside path and filename, also content-type, descriptiton, user-restrictions etc.

within the page, the user will than receive a list of possible download files.
by clicking on the link, i redirect to a "download.asp"-page, where i just want to start the download by sending the file to the user. so far - so bad :-)

i tried 2 free components (TabsUpload; aspSmartUpload)and also a simple response.BinaryWrite and here´s the problem: everything works fine, as long as i am messing round with other file formats than ZIP (!). I can use the system for downloading pdfs, exe, docs... but when i want to dl a zip-file, the system "hangs up" (only the browser wants to connect endlessly.. its not a crash, because i can stop it by using ESC-key)

one interesting thing:
when i use the the BinaryWrite-method, a file is downloaded - but of course not the zip file - it is a html-page with the wrong content-type ;-) using a text/hex-editor, you can find this error message: Response Buffer Limit Exceeded

possible solution for this would normaly be, to turn Response.Buffer = False
but, for using either binaryWrite or one of the components, Response.Buffer should be set to True, as far as i know...

so anyway, here is the source-code: ...

View Replies View Related

XP SP2 And Downloading Files Automatically Closes Window

We have numerous pages that allow users to download textfiles. To invoke the File Download Dialog, we use ASP, FSO and ADODB Stream. It worked fine in SP1. In SP2, however, once downloading is done, the window that opened the File Download Dialog automatically closes. Any idea what's causing this? Where can I find information on SP2 in relation to FSO and ADODB Stream?

View Replies View Related

WebDAV Downloading Attachments From Exchange Server

I have the following code, that retrieves the emails from a designated inbox, stores the message and subject content in a SQL database and then deletes them from the exchange server. Now I need to take the attachments for each email and save them on a different server.

I've researched this all day, and I keep finding references stating that I can download the file using, X-MS-ENUMATTS. I'm using it currently to retrieve a list of attached files, however I fail to see how I can download the attachment to my webserver using this.

The red code below is a request to the actual file. So I know the http path to the file, how do I go about saving it to my server? If I can't downlaod it without any user interaction, is there at least a way that I could allow the user to download the file via a link, without them being prompted for a username or password? Code:

View Replies View Related

Processing Scripts Stored In SQL Server

I've got page contant stored in an SQL database, some of these pages contain ASP code. But when I read the data out of the database and display it on the page it is displaying it "as-is", that is to say it's not processing the ASP code.

Is there a way to force the server to process what comes out of the database as if it were reading from a standard ASP file?

View Replies View Related

Reading Linked Server Stored Procedure

I've got a stored procedure which returns a select query on a linked server. This works fine if i call within SQL and Query Analyser but if i try and execue to return data to a ASP recordset i get the ridiculous

Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC SQL Server Driver][SQL Server]OLE DB error trace [OLE/DB Provider 'MSDASQL' IDBInitialize::Initialize returned 0x80004005: The provider did not give any information about the error.].

Am i missing something really basic like a simple setting or is it just not possible.

Heres my ASP code: ...

View Replies View Related

Passing Parameter From ASP Web Page To Stored Procedure In SQL Server

I'm trying to pass parameters from an ASP (VBScript) web page to a Stored Procedure in SQL Server. I know how to do the Stored procedure but it's passing the parameter from the web page that is stumping me.

View Replies View Related

Server.Mappath() To Include Files For Other Domains On Same Server?

If I have multiple websites on the same server,can I use the #include directive to reference include files elsewhere on the server? I tried this -

<!--#include file="C:InetpubvhostsATRAMEMBER.COMhttpdocsheader.asp" -->

But no dice...

View Replies View Related

External Server Pull Files From Internal Server

I have an application that needs to pull files from an internal server. This
is the setup. The web server is external facing, meaning exposed to the
internet. I then have a file server that sits inside our domain. I created a
COM object that can impersonate a user to retrieve files from that server.
However, I cannot get the application to pull files from the internal server.

I first tried a domain account that could reach both servers. This did not
work. I then had the network team create the same account on both machines.
This is not working either. I can impersonate the user (I am able to get the
user/users authenticated), but the script keeps coming back with and access
denied. Code:

View Replies View Related

Transfer Files From One Web Server To Another Web Server

How can i transfer files from one web server to another web server. Is it possible?

View Replies View Related

Copying Files From Server To Server

if there's a way to copy image files from one server to another using ASP and FSO? Or perhaps some other way to do it? I'm trying to collect information on books, and want to have a picture of the book associated with the description, but I want to be nice and
host the pictures myself, not just link to other people's pictures. Is there a way to do this?

View Replies View Related

Server Log Files

is it possiable to write in asp program that will be able to analytics the server log files? any information on this subject will be good for me now cause i'm just starting...links...codes...any info...

View Replies View Related

Files To Another Server

I am running a application create and write in a file it works fine as it writes on the same server. But I need to create & write it on the another server. Is it possible?

View Replies View Related

Files From Another Server

I'm building an ASP site that needs to include some ASP files from another web server. Can I include them like traditional SSI or I have to use some special code or functions.

View Replies View Related

Copying Files From Web To Server

i want to copy a file(.jpg, .swf ...) on the web, to my server. how can i
write this function? it should take an url of a file and past the file to my
server in related folder.

View Replies View Related

Upload Files To Server

I need to allow a user to upload images to my website.
I can't use an asp.net solution, just asp 3.0.

View Replies View Related

Upload Files To A Web Server

I'm trying to develop a webpage that will allow people to upload pictures onto the webserver from their own PC's but don't have a clue where to start!

View Replies View Related

How Can I Delete All Files On Server?

i want to delete all files from a dir off the server any suggestions?I know how to delete specific files but i dont know how to delete all files.

View Replies View Related

Creating Files On Another Server

I am trying to create a file on another server, but I get either "Permission Denied" or "Path not found" errors. If it helps, the folder I am attempting to put it in is a shared folder. here is the path that I am trying to put the file in...Code:

set f=fs.CreateTextFile("192.168.50.15E:Common est.txt",true)

View Replies View Related

Upload Files To A Server

I am curious if anyone can help me to upload files to a server using asp. I am making an interface so user can upload any files to the dedicated web server.

View Replies View Related

Accessing Files On Another Server

Development environment: Windows 2003 Server running IIS6 and the same
server running as a domain controller, DNS and DHCP servers.

Production environment: Windows 2000 Server SP4 running IIS5 and not used
to provide domain control or name services.

The two environments are on different networks with no trust relationship
between them. In both environments the web server is set up to disallow
anonymous access and to use integrated Windows authentication. The
application is vanilla ASP (i.e. not .NET) VBScript.

In the development environment, the following code runs flawlessly no
matter whether "myUNCPath" points to a share on the web server or a share
on another server in the same domain.

Set objFilesys = Server.CreateObject("Scripting.FileSystemObject")
If Not objFileSys.FolderExists(myUNCPath) Then
Set objFolder = objFileSys.CreateFolder(myUNCPath)
End If

However, in the production environment it falls over with a permission
denied error when "myUNCPath" is on another server and further testing
shows that the FolderExists method is returning false even when
"myUNCPath" exists. The network share is configured to give full control
to the Everyone group.

I've found http://support.microsoft.com/kb/207671 which although
referring to IIS4 suggests that the issue could be the authentication
method (I'm assuming that integrated Windows authentication is close
enough to NT Challenge/Response and so might generate a token that cannot
access network resources). I'm not sure of this is the problem because if
it were then the code shouldn't work in my development environment.

Any ideas on what's going wrong and how to access the network resources
in the production environemt?

View Replies View Related

Browsing Files On The Web Server

I have an admin page for adding pictures to a stock list, currently it browses and uploads from a local pc to the server but can you browse, say,the images folder on the webserver?

View Replies View Related

Delete Files Off The Server

Linux Server with Chillisoft ASP.

How would I get an ASP page to delete an image file, probably a .jpg off the server.

Basically, what I want to do, is that when the user deletes a product item from the database, it will also delete the corresponding image file from the images folder. So that the server space doesn't just fill up with redundant image files over time.

If it makes any difference the image files are uploaded using a PHP script, I've no idea how it works, but it does.

View Replies View Related

Delete Files In Server

I have a Product and that product contains some documents.The documents are uploaded to server and can be viewed in my asp application.

In admin module i have given option to edit or delete that product.In the event of edit just the records in the database get changed.But in the case of delete i have to do 2 things

1. Delete all the data related to that product.
2. Delete all the related documents for that product in the server.

So can anybody help me figure out how to delete a file using asp in ftp server.

View Replies View Related

Deleting Files From The Server

I am pretty proficient in the use of the File System Object to create and access files on the server - but can someone please tell me how to DELETE these files.I must be missing something pretty basic.

View Replies View Related

Copying Files To The Server.

How can i copy GIF file from another server to my server?

View Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved