How to Call a file from SQL DB?

Results 1 to 3 of 3

Thread: How to Call a file from SQL DB?

  1. #1
    Join Date
    Dec 1969

    Default How to Call a file from SQL DB?

    I have a database that stores user information, as well as a fso that holds the user's page. Can I store the page name & location in the database so that when the record is called from the rs, the page is shown???

  2. #2
    Join Date
    Dec 1969

    Default Is their page ASP or HTML?

    HTML answer:<BR><BR>Assuming you have gotten to the point of making the query and getting the recordset with the field that has the file name...<BR><BR>&#060;%<BR>... open RS ....<BR><BR>fileName = RS("theFieldWithTheFileName")<BR><BR>Set FSO = Server.CreateObject("Scripting.FileSystemObject")< BR>Set infile = FSO.OpenTextFile( Server.MapPath( fileName ) )<BR>Response.Write infile.ReadALL<BR>infile.Close<BR>...<BR>%&#062;<B R><BR>*************<BR><BR>ASP Answer:<BR><BR>&#060;%<BR>... open RS ....<BR><BR>fileName = RS("theFieldWithTheFileName")<BR><BR>Response.Redi rect fileName<BR>%&#062;<BR><BR>Of course, you can use the ASP answer for HTML files, as well, but you have a little more flexibility when the code in the user&#039;s file doesn&#039;t have to be handled by ASP.<BR><BR>ALSO...<BR><BR>Look into Server.Execute or Server.Transfer as alternatives.<BR><BR>

  3. #3
    Join Date
    Dec 1969

    Default a bit vague

    can you elaborate a little? I&#039;m not seeing the point...<BR><BR>j

Posting Permissions

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