Downloading a file from a database

Results 1 to 2 of 2

Thread: Downloading a file from a database

  1. #1
    Join Date
    Dec 1969

    Default Downloading a file from a database

    In a db I have added several components that has to be merged when a user requests a melody. The db contains several melodies and they are merged together in the following format.<BR><BR>Song = "BEGIN:IMELODY" + vbCrLf + "Version:1.2" + vbCrLf + "FORMAT:CLASS1.0" + vbCrLf<BR>Song = Song + "Name:" + objRs("Title") + vbCrLf<BR>Song = Song + "COMPOSER:" + objRs("Group") + vbCrLf<BR>Song = Song + "BEAT:" + objRs("Beat") + vbCrLf<BR>Song = Song + "STYLE:" + objRs("Style") + vbCrLf<BR>Song = Song + "VOLUME:" + objRs("Volume") + vbCrLf<BR>Song = Song + "MELODY:" + objRs("Notes") + vbCrLf<BR>Song = Song + "END:IMELODY" + vbCrLf<BR><BR>When this is done the variable "Song" will be sent to the user but how do I send it????<BR><BR>I have tried with the following lines:<BR><BR>Response.ContentType = "audio/imelody"<BR>Response.AddHeader "content-disposition","inline; filename=song.imy"<BR>Response.Write(Song)<BR><BR> but the browser doesn&#039;t recognize the filename. If I take the variable song and put it in a text file - then it works fine.

  2. #2
    Join Date
    Dec 1969

    Default RE: Downloading a file from a database

    The Browser needs to see a physical file on the drive where it should be downloaded, so it seems you will have to write the files out to a folder on the drive, I wouyld recommend that you then check if the file exists before creating it, and then simpley reference it!<BR><BR>HTH

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts