Can someone explain how?

Results 1 to 3 of 3

Thread: Can someone explain how?

  1. #1
    Join Date
    Dec 1969

    Default Can someone explain how?

    Exactly HOW can I make it so that my database has a file include, so that when a recordset returns a record, the file is also given/shown to the user? I can't just use ("c:myfiles('"&filename&"')")..........c an I???? Do I have to tell SQL Server that it's a file location, and not something to be displayed??

  2. #2
    Join Date
    Dec 1969

    Default RE: Can someone explain how?

    If I understand you question correctly you cannot return a include file in your result set based on a query. This being b/c include files are interpreted first, even before your ASP code is executed. You will need to predefine your file location. If that's not what you are asking then let me know.

  3. #3
    Join Date
    Dec 1969

    Default You are thinking WAY too hard...

    These systems are idiot computers, not human beings. They can&#039;t follow your thoughts. They have to be told, tiny step by tiny step, what to do. <BR><BR>So, for example, SQL Server has *no idea* that what you have stored in that field is a file name. To the DB, it is nothing but some other string.<BR><BR>Thus, if you want to use it as a filename and include the contents of the designated file, *YOU* have to some "convert" that string into the *contents* yourself. In your code.<BR><BR>Time to look into the Scripting.FileSystemObject.<BR><BR>And before you do that...<BR><BR>Does this even begin to make sense to you:<BR>&nbsp; &nbsp; ("c:myfiles(&#039;"&filename&"&#039;)")<BR><BR>*** uming that filename was something like "foo.jpg" then that expression would give you a result of<BR>&nbsp; &nbsp; c:myfiles(&#039;foo.jpg&#039;)<BR><BR>Doesn&#039;t make sense. Windows doesn&#039;t allow ( or ) [not sure about &#039; marks] in filenames, does it? <BR><BR>Anyway, rather than try to build the path by hand, look into Server.MapPath. It&#039;s *probably* (but not necessarily) what you want.<BR><BR>

Posting Permissions

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