Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CREATE link and UPLOAD binary to SQL via ASP

Status
Not open for further replies.

specialist

Programmer
Sep 7, 2001
50
US
Greetings-

I must create an application with the option which allows end users to upload files to a SQL database. Instead of storing the file in the database itself, I would like to have ASP create the URL where the file will reside on the server, and also upload the file itself.

My queston is two fold:

1. Are there any known tutorials for this sort of thing? All I can find is a solution which stores the binary in the db itself. I do not want to do down that route!

2. Has anyone created such an app and would you be willing to share your techniques or advise me on how to complete this task?

Many thanks in advance for any help.

-Mike

P.S. Have a nice day
smiletiniest.gif
 
yes there are a lot of things you can use. one thing you might be interested in is ASPupload or a third party ASP upload component. what it does is allows an asp script to browse for a file and upload it using it's third party obkect. The way you would write it to a file is using the filesystem object with it writing the name to the exact db you wanted to use.

the one i use is ASPsmartupload.

try their website they also have tutorials for you if you'd like to use their component.
 
kisasama-

thank you for your reply. I was hoping to do this without the support of a third-party component.

Is there a way I can do this on my own?
-Mike
 
unfortunately I can understand where you're coming from and the answer is you can but I wouldn't recommend it. The method is not very scaliable and the code is pretty ugly. you can do it by creating a file uploader object and create a call to the method. you can see the code here. but If you're not familiar with it you may be causing yourself a lot of heart ache.


i recommend if you want to use a third party I would say look at this article. It's very help file.


KS
 
kisasama-

thanks for the advice and the links. I'm going to use them as my 'jumping off point' to make this work.

I'm certain I am not the only person who needs this functionality on one of their applications. The previous version of this app has the files being stored directly in an access db. Now they are migrating to sql and it seems to be a best practice to add the link to a url where the file can be located.

It appears to be two step involved:

1. upload the file to the directory.
2. create the link where the file can be found (based on the record number as well as the file name)

Should be fun!
smiletiniest.gif


cheers,

Mike
 
yup i would just add a url table with a file info and a id. i've done many applications like this. probably the most popopular ones outthere
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top