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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

archiving - help required. 1

Status
Not open for further replies.

krish1980

Programmer
Feb 27, 2002
20
US
hello friends,

can some of u suggest a few ways for archiving uploaded files in the server. i would appreciate any sort of suggestion in this regard.

thanks,
krish. Krishnamoorthy
krish1980@rediffmail.com
 
Depends. What sort of files, sizes, purposes, etc. Are these files something that the visitor needs access to for a certain amount of time, then after than stick 'em in a corner? What upload asp component are you using? AspUpload, ABCUpload, etc, etc???

Please be a little more specific.
 
the documents are terms & conditions & documents to be downloaded by the users. after a few months it has to be put in a archive & they should be provided with a feature to download them by searching for a particular month or date.

i'm using aspupload to upload the files. i would like to know some method by which archiving is done as i have no idea how archiving is done on the server.

thanks,
krish. Krishnamoorthy
krish1980@rediffmail.com
 
You can insert the file info in a database table. This table contains a unuque auto increment field called ID, because this is unique you can use this ID to give the uploaded file a name.
comm.CommandText = "set nocount on;insert into [tblDistiller] (date,orgFileName) VALUES ('" & now() & "','" & Replace(objRequest.Form("FileName"), "'", "''", , , vbTextCompare) & "');SELECT @@IDENTITY AS newrec;SET NOCOUNT ON"
conn.Open
comm.ActiveConnection = conn
Set rs = comm.Execute
intID = rs!newrec

The above is t-SQL and works with SQL server.
Now use the intID to move the uploaded file to the archive directory giving it the name: [intID].
If a user searches a certain file (in this case the user can only look for the inserted date) you will get a resultset. Present the user with the orgFilenames of the result set.
If a user clicks on a certain file you can response.binarywrite the file to the browser or copy the file to a directory giving it it's original name back.

Putting the data in the database you can have versions, user security etc etc.

You can use allso Microsoft Index server to search files on content and modified date.

To start index server choose start -> run -> mmc.exe -> console -> add/remove snap in -> add -> indexing service -> local computer (or the IIS computer where your site is running) -> finish -> close -> single click on indexing service so it is selected -> ok
When you press F1 (help) with indexing services you can search on "making querys"
 
thanks harmmeijer for ur info. Krishnamoorthy
krish1980@rediffmail.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top