Stream Object

Results 1 to 2 of 2

Thread: Stream Object

  1. #1
    Join Date
    Dec 1969

    Default Stream Object

    I am trying to pull up text from a .txt file into my page using the following code that came from "Professional Active Server Pages 3.0 by Wrox Press."<BR><BR>I don&#039;t understand what to use for the provider in the connection string. Is there another connection string I should use?<BR><BR>Here is the code for the connection string, followed by the Stream page.<BR><BR>&#060;!-- METADATA TYPE="typelib" FILE="c:program filescommon filessystemadomsado15.dll" --&#062;<BR><BR><BR>*****Connection.asp*****<BR><BR> &#060;%<BR> Dim strConn<BR><BR> strConn = "Provider=sdgs;dfjg"<BR>%&#062;<BR><BR><BR><BR>*** ****Stream.asp*******<BR><BR>&#060;!-- #INCLUDE FILE="../Splash/Connection.asp" --&#062;<BR><BR>&#060;%<BR> Dim stmData<BR><BR> &#039; create the Stream objects<BR> Set stmData = Server.CreateObject ("ADODB.Stream")<BR><BR> &#039; open the contents of the file as a stream<BR> stmData.Open "URL=http://hhcs/Splash/splash.txt", adModeRead, adOpenStreamFromURL<BR><BR> &#039; display the contents<BR> stmData.Charset = "ascii"<BR><BR> Response.Write stmData.ReadText<BR> stmData.Close<BR> Set stmData = Nothing<BR><BR>%&#062;<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Stream Object

    Have you looked at the FAQs? They have a rather simple method:<BR><BR>How can I read the contents of a text file through an ASP page?<BR><BR><BR>Hope this helps you... <BR><BR>Vadim C.

Posting Permissions

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