1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

read data from file error message

Discussion in 'C#' started by t7584, Mar 28, 2006.

  1. #1
    read data from file error message

    this program, that reads data from file , works
    <%const forreading = 1
    const tristateusedefault = -2

    Dim FSO, TextStream, S
    set FSO = server.createobject("Scripting.FileSystemObject")


    Set FSO = CreateObject("Scripting.FileSystemObject")
    Set TextStream = FS:confused:pentextfile("c:\testfile.txt",forreading, tristateusedefault)
    %>
    <A NAME="closereadfromfile"></A><%

    S = TextStream.ReadAll & NewLine & NewLine

    TextStream.Close

    response.write(S)

    %>

    But when I try to use it in another program it doesn't work
    error message - Microsoft VBScript runtime error '800a01f4'

    Variable is undefined: 'NewLine'
    SEMrush
     
    t7584, Mar 28, 2006 IP
    SEMrush
  2. vectorgraphx

    vectorgraphx Guest

    Messages:
    545
    Likes Received:
    16
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you're treating "newline" as a variable but not defining it in your dim, or adding any values to it. try "+ newline" instead of "& newline", or remove the "& newline & newline" from your S variable.
     
    vectorgraphx, Mar 28, 2006 IP