Little Question In Asp

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • asdasd10
    New Member
    • Apr 2010
    • 14

    #1

    Little Question In Asp

    Code:
    <%
    dim fs,fname
    set fs=Server.CreateObject("Scripting.FileSystemObject")
    set fname=fs.CreateTextFile("c:\test.txt",true)
    fname.WriteLine("Hello World!")
    fname.Close
    set fname=nothing
    set fs=nothing
    %>

    In this code i made a text file and call him test through asp and write inside Hello World! through asp.
    My question is in the Line
    Code:
    fname.WriteLine("Hello World")
    i want put there some asp code and access to db
    i success with the <%%> but when i put some " its give me erors
    anyone know how i can access my db through fname.WriteLine ?
  • jhardman
    Recognized Expert Specialist
    • Jan 2007
    • 3405

    #2
    Code:
    dim q
    q=chr(34) 'quote mark
    fname.writeline ("<%="&q&"hello world"&q&"%>")
    Why on earth would you want to give db access to a text file you are creating programatically ?

    Jared

    Comment

    • asdasd10
      New Member
      • Apr 2010
      • 14

      #3
      thank u i managed what i want..

      Comment

      Working...