Results 1 to 2 of 2

Thread: Creating Files then Closing connection?

  1. #1

    Thread Starter
    New Member
    Join Date
    Jan 2004
    Posts
    11

    Creating Files then Closing connection?

    i use this to make the file and that works , but anytime i try and open the file for reading it says that the file is still in use and takes a hissy fit.

    Dim temp As String = filename_bx1.Text
    IO.File.CreateText(temp)

    and using , to open it

    IO.File.Open(temp, IO.FileMode.Open)

    any ideas how to close its connection down?

    aslo does anyone know any good tutorials on file handling?

    Cheers for any help in advance, Rue
    Last edited by Rue; Feb 14th, 2004 at 07:04 PM.

  2. #2
    The Devil crptcblade's Avatar
    Join Date
    Aug 2000
    Location
    Quetzalshacatenango
    Posts
    9,091
    CreateText() returns an IO.StreamWriter...

    VB Code:
    1. IO.File.CreateText("c:\temp.txt").Close()
    Laugh, and the world laughs with you. Cry, and you just water down your vodka.


    Take credit, not responsibility

Posting Permissions

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



Click Here to Expand Forum to Full Width