Hi all,
im working on a DB that wotes to a file and would like to have the text file within the VB.net app. I currenlty write to the file as below...... but would like not to have a hard wired location if you know what i mean ;). Thanks in advance
Public Class frmNewUser
Private Sub Send_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Send.Click
Dim strFile As String = "e:\test.txt"
Dim sw As StreamWriter
Try
If (Not File.Exists(strFile)) Then
sw = File.CreateText(strFile)
Else
sw = File.AppendText(strFile)
End If
sw.WriteLine(txtusername.Text & vbTab & txtpassword.Text )
sw.Close()
MsgBox("User account created - login succ")
im working on a DB that wotes to a file and would like to have the text file within the VB.net app. I currenlty write to the file as below...... but would like not to have a hard wired location if you know what i mean ;). Thanks in advance
Public Class frmNewUser
Private Sub Send_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Send.Click
Dim strFile As String = "e:\test.txt"
Dim sw As StreamWriter
Try
If (Not File.Exists(strFile)) Then
sw = File.CreateText(strFile)
Else
sw = File.AppendText(strFile)
End If
sw.WriteLine(txtusername.Text & vbTab & txtpassword.Text )
sw.Close()
MsgBox("User account created - login succ")