14 Replies - 31286 Views - Last Post: 27 May 2012 - 05:48 AM Rate Topic: -----

#1 ultrajet  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 26-July 08

How to Create a text file, then readline and writeline it?

Post icon  Posted 13 September 2008 - 02:11 AM

When the form load
I needed to create a text file into "C:\Program Files\User\User.text"
But if the file exist it will read line1, line 2 and line3 of the text in different textboxes

Then if I click save, it will write textbox 1 to line 1, textbox2 to line 2 and textbox3 to line 3.

How do I do it?

Thanks in advance
Is This A Good Question/Topic? 0
  • +

Replies To: How to Create a text file, then readline and writeline it?

#2 Damage  Icon User is offline

  • Lord of Schwing
  • member icon

Reputation: 28
  • View blog
  • Posts: 1,090
  • Joined: 05-June 08

Re: How to Create a text file, then readline and writeline it?

Posted 13 September 2008 - 02:25 AM

Seriously I don't mean to bitch but you should at least try and find an answer before asking.
a simple google search brings up tons of pages
http://support.microsoft.com/kb/315828
for instance
Was This Post Helpful? 0
  • +
  • -

#3 ultrajet  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 26-July 08

Re: How to Create a text file, then readline and writeline it?

Posted 13 September 2008 - 02:29 AM

I did, but it doesn't teach people how to create a text file
Was This Post Helpful? 0
  • +
  • -

#4 ultrajet  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 26-July 08

Re: How to Create a text file, then readline and writeline it?

Posted 13 September 2008 - 02:36 AM

I'm stuck at creating a file for 4 hours.

The last code that I used is:


		If File.Exists("C:\Program Files\TIUser\TextFile.dat") Then
			MessageBox.Show("File Already Exist")
		Else
			System.IO.File.Create("C:\Program Files\TIUser\TextFile.dat")

		End If


But error appears saying that "cannot find path

This post has been edited by ultrajet: 13 September 2008 - 02:38 AM

Was This Post Helpful? 0
  • +
  • -

#5 Damage  Icon User is offline

  • Lord of Schwing
  • member icon

Reputation: 28
  • View blog
  • Posts: 1,090
  • Joined: 05-June 08

Re: How to Create a text file, then readline and writeline it?

Posted 13 September 2008 - 02:54 AM

Dim objStreamWriter As StreamWriter
	
   'Pass the file path and the file name to the StreamWriter constructor.
   objStreamWriter = New StreamWriter("C:\Testfile.txt")

   'Write a line of text.
   objStreamWriter.WriteLine("Hello World")

   'Write a second line of text.
   objStreamWriter.WriteLine("From the StreamWriter class")

   'Close the file.
   objStreamWriter.Close()


theres an option to append as well

So that should solve your problem, if the file exists it will add to the end of the file. if it doesn't it will create the file
Was This Post Helpful? 0
  • +
  • -

#6 ultrajet  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 26-July 08

Re: How to Create a text file, then readline and writeline it?

Posted 13 September 2008 - 02:58 AM

Thanks, it works!

But is there any way for me to create a non existing directory?

Example I wanted to put it on "C:\User\user.txt" even if the directory does not exist?
Was This Post Helpful? 0
  • +
  • -

#7 Damage  Icon User is offline

  • Lord of Schwing
  • member icon

Reputation: 28
  • View blog
  • Posts: 1,090
  • Joined: 05-June 08

Re: How to Create a text file, then readline and writeline it?

Posted 13 September 2008 - 03:29 AM

Dim dir As String = "c:\Directory"
My.Computer.FileSystem.CreateDirectory(dir)


Was This Post Helpful? 0
  • +
  • -

#8 ultrajet  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 26-July 08

Re: How to Create a text file, then readline and writeline it?

Posted 13 September 2008 - 03:45 AM

Help, my write line does not work

Check the red one.
Here is the code:

Public Class Form2
	Dim objStreamWriter As StreamWriter
	Dim objStreamWriter1 As StreamWriter
	Dim objStreamWriter2 As StreamWriter
	Dim objStreamWriter3 As StreamWriter
	Dim strLine As String
	Dim objStreamReader As StreamReader
	Dim objStreamReader1 As StreamReader
	Dim objStreamReader2 As StreamReader
	Dim objStreamReader3 As StreamReader

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
		If File.Exists("C:\user.txt") Then
			MessageBox.Show("Account Already Exist")

		Else
			objStreamWriter = New StreamWriter("C:\user.txt")
			objStreamWriter1 = New StreamWriter("C:\user1.txt")
			objStreamWriter2 = New StreamWriter("C:\user2.txt")
			objStreamWriter3 = New StreamWriter("C:\user3.txt")
			objStreamWriter.Close()
			objStreamWriter1.Close()
			objStreamWriter2.Close()
			objStreamWriter3.Close()
		End If
		Try
			objStreamReader = New StreamReader("C:\user.txt")
			objStreamReader1 = New StreamReader("C:\user1.txt")
			objStreamReader2 = New StreamReader("C:\user2.txt")
			objStreamReader3 = New StreamReader("C:\user3.txt")
			Admin.Text = objStreamReader.ReadLine
			Sales.Text = objStreamReader1.ReadLine
			Purchaser.Text = objStreamReader2.ReadLine
			HRD.Text = objStreamReader3.ReadLine
			objStreamReader.Close()
			objStreamReader1.Close()
			objStreamReader2.Close()
			objStreamReader3.Close()
		Catch ex As Exception
			MessageBox.Show("Account have been made.")

		End Try
		
[color=#FF0000]
Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
		objStreamWriter = New StreamWriter("C:\user.txt", False)
		objStreamWriter1 = New StreamWriter("C:\user1.txt", False)
		objStreamWriter2 = New StreamWriter("C:\user2.txt", False)
		objStreamWriter3 = New StreamWriter("C:\user3.txt", False)


		objStreamWriter.WriteLine(Admin.Text)
		objStreamWriter1.WriteLine(Sales.Text)
		objStreamWriter2.WriteLine(Purchaser.Text)
		objStreamWriter3.WriteLine(HRD.Text)
		MessageBox.Show("Password changed")[/color]
	End Sub



End Sub

This post has been edited by ultrajet: 13 September 2008 - 03:50 AM

Was This Post Helpful? 0
  • +
  • -

#9 Damage  Icon User is offline

  • Lord of Schwing
  • member icon

Reputation: 28
  • View blog
  • Posts: 1,090
  • Joined: 05-June 08

Re: How to Create a text file, then readline and writeline it?

Posted 13 September 2008 - 03:47 AM

have you remembered to include imports system.io
and what error are you getting?

this is an example of how to use a streamreader
 Dim reader As StreamReader =  New StreamReader(winDir & "\system.ini")
		Try
			Me.ListBox1.Items.Clear()
			Do 'Until reader.Peek = -1
				Me.ListBox1.Items.Add(reader.ReadLine)
			Loop Until reader.Peek = -1

		Catch
			Me.ListBox1.Items.Add("File is empty")


This post has been edited by Damage: 13 September 2008 - 03:52 AM

Was This Post Helpful? 0
  • +
  • -

#10 ultrajet  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 26-July 08

Re: How to Create a text file, then readline and writeline it?

Posted 13 September 2008 - 03:56 AM

I did.

The problem is that the text does not appear on the created text.

For example

after these codes are executed, nothing still appears on the user.txt, user1.txt, etc

Private Sub Button6_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button6.Click
		objStreamWriter = New StreamWriter("c:\Program Files\user\user.txt", False)
		objStreamWriter1 = New StreamWriter("c:\Program Files\user\user1.txt", False)
		objStreamWriter2 = New StreamWriter("c:\Program Files\user\user2.txt", False)
		objStreamWriter3 = New StreamWriter("c:\Program Files\user\user3.txt", False)

		Admin.Text = strLine
		Sales.Text = strLine1
		Purchaser.Text = strLine2
		HRD.Text = strLine3

		objStreamWriter.Write(strLine)
		objStreamWriter1.Write(strLine1)
		objStreamWriter2.Write(strLine2)
		objStreamWriter3.Write(strLine3)
		MessageBox.Show("Password changed")
	End Sub

Was This Post Helpful? 0
  • +
  • -

#11 Damage  Icon User is offline

  • Lord of Schwing
  • member icon

Reputation: 28
  • View blog
  • Posts: 1,090
  • Joined: 05-June 08

Re: How to Create a text file, then readline and writeline it?

Posted 13 September 2008 - 03:57 AM

if i follow what your doing correctly, your creating the 4 text documents and leaving them blank. And then your trying to read data from them into a text box right?
sorry came in after your edit

  Admin.Text = strLine
		Sales.Text = strLine1
		Purchaser.Text = strLine2
		HRD.Text = strLine3




this is wrong. your assigning the value in strline(which I'm assuming is blank) to the textbox.
		strLine=  Admin.Text 
		strLine1 =   Sales.Text
		strLine2 = Purchaser.Text	   
		strLine3 =  HRD.Text 


This post has been edited by Damage: 13 September 2008 - 04:05 AM

Was This Post Helpful? 0
  • +
  • -

#12 ultrajet  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 18
  • Joined: 26-July 08

Re: How to Create a text file, then readline and writeline it?

Posted 13 September 2008 - 04:11 AM

Thanks, couldn't have done it without your help!

It finally worked!
Was This Post Helpful? 0
  • +
  • -

#13 Damage  Icon User is offline

  • Lord of Schwing
  • member icon

Reputation: 28
  • View blog
  • Posts: 1,090
  • Joined: 05-June 08

Re: How to Create a text file, then readline and writeline it?

Posted 13 September 2008 - 04:15 AM

not a problem :) Glad i could help

but for future reference, seriously just spend a couple of minutes googling it, it can often save you hours of headache :P
Was This Post Helpful? 0
  • +
  • -

#14 pdoxtader  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 26-May 12

Re: How to Create a text file, then readline and writeline it?

Posted 26 May 2012 - 09:26 AM

This is an old thread, I know. I stumbled across it while looking for information on working with ini files. After reading this, I threw together a quick class for reading / writing ini files. I thought I would post it here for anyone else who was looking for the same thing. Maybe this will help someone out.


' Read and write ini files.
    Public Class InIFileControler

        Private iniPath As String = ""
        Private keyValueSeparator As String = ""

        Public Sub New(ByVal _iniPath As String, Optional ByVal _keyValueSeparator As String = "=")
            iniPath = _iniPath
            keyValueSeparator = _keyValueSeparator
        End Sub

        ' Returns the path without file name, if the complete path with file name is provided.
        ' ie:
        ' Provided: c:\somefolder\somefolder\somefilename.exe
        ' Returned: c:\somefolder\somefolder\
        Private Function GetFolderFromPath(ByVal completePath As String) As String
            Dim parts() As String
            Dim count As Int32 = 0
            GetFolderFromPath = ""

            parts = Split(completePath, "\")

            For count = 0 To parts.Length - 2
                GetFolderFromPath = GetFolderFromPath & parts(count) & "\"
            Next

        End Function

        Private Function CreateFolders(ByVal _path As String) As Boolean
            CreateFolders = True

            Dim parts() As String
            Dim path As String = ""
            Dim count As Int32
            parts = Split(_path, "\")


            path = parts(0)
            For count = 1 To parts.Length - 1
                path += "\" & parts(count)
                Try
                    If Not Directory.Exists(path) Then
                        Directory.CreateDirectory(path)
                    End If
                Catch ex As Exception
                End Try
            Next

        End Function

        Private Function PauseWithoutBlockingUI(ByVal M As Double) As Boolean

            Dim timeOut As DateTime = Now.AddMilliseconds(M)

            Do
                Application.DoEvents()
            Loop Until Now > timeOut

        End Function

        ' Get the contents of the ini file.
        Public Function Read(ByRef iniEntries As ArrayList, Optional ByRef errorMessage As String = "") As Boolean

            If Not File.Exists(iniPath) Then
                errorMessage = "Ini file not found."
                Return False
            End If

            Try
                ' Read the ini file into an arraylist...
                Dim reader As StreamReader = New StreamReader(iniPath)
                iniEntries.Clear()

                Do Until reader.Peek = -1 'Until eof
                    iniEntries.Add(reader.ReadLine)
                Loop

                reader.Close()

            Catch ex As Exception
                ' The file's empty.
            End Try

            Return True

        End Function

        ' Error Message will be in theValue on failure.
        Public Function GetValue(ByVal theKey As String, ByRef theValue As String) As Boolean

            Dim iniEntries As New ArrayList
            Dim count As Int32 = 0
            Dim parts() As String = Nothing
            Dim tmp As String = ""
            Dim tmpKey As String = ""
            Dim tmpValue As String = ""

            ' Get the contents of the ini file.
            If Not Read(iniEntries, tmp) Then
                theValue = tmp
                Return False
            End If

            ' search for the key...
            If iniEntries.Count > 0 Then
                For count = 0 To iniEntries.Count - 1
                    tmp = CStr(iniEntries.Item(count))
                    parts = Split(tmp, keyValueSeparator)
                    tmpKey = parts(0)
                    tmpValue = parts(1)

                    ' Have we found it?
                    If theKey.ToLower.Trim = tmpKey.ToLower.Trim Then
                        theValue = tmpValue
                        Return True
                    End If
                Next

                theValue = "Entry not found."
            Else
                theValue = "No entries found in the ini file."
            End If

            Return False

        End Function

        Public Function Write(ByVal theKey As String, ByVal theValue As String, _
                              Optional ByRef errorMessage As String = "") As Boolean

            Dim iniEntries As New ArrayList
            Dim count As Int32 = 0
            Dim tmp As String = ""
            Dim parts() As String = Nothing
            Dim tmpKey As String = ""
            Dim tmpValue As String = ""
            Dim valueWritten As Boolean = False

            ' If ini file doesn't exist, create it.
            If Not File.Exists(iniPath) Then
                Try
                    CreateFolders(GetFolderFromPath(iniPath))
                    Dim fs As New FileStream(iniPath, FileMode.Create)
                    fs.Close()
                Catch ex As Exception
                    errorMessage = "Could not create ini file: " & iniPath
                    Return False
                End Try
            End If

            ' Get the contents of the ini file, and
            ' report an error reading from it, if any.
            If Not Read(iniEntries, tmp) Then
                errorMessage = tmp
                Return False
            End If

            ' Delete the original ini file.
            Try
                File.Delete(iniPath)
            Catch ex As Exception
                errorMessage = ex.Message
                Return False
            End Try

            ' Wait for it to be deleted...
            While File.Exists(iniPath)
                PauseWithoutBlockingUI(10)
            End While

            Try
                Dim writer As New StreamWriter(iniPath, False)

                If iniEntries.Count < 1 Then
                    writer.WriteLine("" & theKey & keyValueSeparator & theValue & "")
                    valueWritten = True
                Else
                    For count = 0 To iniEntries.Count - 1
                        tmp = CStr(iniEntries.Item(count))
                        parts = Split(tmp, keyValueSeparator)
                        tmpKey = parts(0)
                        tmpValue = parts(1)

                        ' Modify ini file if the key already exists.
                        If theKey.ToLower.Trim = tmpKey.ToLower.Trim Then
                            writer.WriteLine("" & theKey & keyValueSeparator & theValue & "")
                            valueWritten = True
                        Else
                            writer.WriteLine(tmp)
                        End If

                        ' Add it to the ini file if the key didn't exist in it already
                        If Not valueWritten Then
                            writer.WriteLine("" & theKey & keyValueSeparator & theValue & "")
                            valueWritten = True
                        End If
                    Next
                End If

                writer.Close()

            Catch ex As Exception
                errorMessage = "Error writing in file." & vbCrLf & vbCrLf & ex.Message
                Return False
            End Try

            Return valueWritten
        End Function

    End Class



Was This Post Helpful? 0
  • +
  • -

#15 pdoxtader  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 2
  • Joined: 26-May 12

Re: How to Create a text file, then readline and writeline it?

Posted 27 May 2012 - 05:48 AM

Found a bug in the code I posted previously... fixed it here.

Public Class InIFileControler

        Private iniPath As String = ""
        Private keyValueSeparator As String = ""

        Public Sub New(ByVal _iniPath As String, Optional ByVal _keyValueSeparator As String = "=")
            iniPath = _iniPath
            keyValueSeparator = _keyValueSeparator
        End Sub

        ' Returns the path without file name, if the complete path with file name is provided.
        ' ie:
        ' Provided: c:\somefolder\somefolder\somefilename.exe
        ' Returned: c:\somefolder\somefolder\
        Private Function GetFolderFromPath(ByVal completePath As String) As String
            Dim parts() As String
            Dim count As Int32 = 0
            GetFolderFromPath = ""

            parts = Split(completePath, "\")

            For count = 0 To parts.Length - 2
                GetFolderFromPath = GetFolderFromPath & parts(count) & "\"
            Next

        End Function

        Private Function CreateFolders(ByVal _path As String) As Boolean
            CreateFolders = True

            Dim parts() As String
            Dim path As String = ""
            Dim count As Int32
            parts = Split(_path, "\")


            path = parts(0)
            For count = 1 To parts.Length - 1
                path += "\" & parts(count)
                Try
                    If Not Directory.Exists(path) Then
                        Directory.CreateDirectory(path)
                    End If
                Catch ex As Exception
                End Try
            Next

        End Function

        Private Function PauseWithoutBlockingUI(ByVal M As Double) As Boolean

            Dim timeOut As DateTime = Now.AddMilliseconds(M)

            Do
                Application.DoEvents()
            Loop Until Now > timeOut

        End Function

        Public Function ClearINI(Optional ByVal errorMessage As String = "") As Boolean

            Try
                File.Delete(iniPath)
            Catch ex As Exception
                errorMessage = ex.Message
                Return False
            End Try

            Try
                Dim newIni As New FileStream(iniPath, FileMode.Create)
                newIni.Close()
            Catch ex As Exception
                errorMessage = ex.Message
                Return False
            End Try

            Return True

        End Function

        ' Get the contents of the ini file.
        Public Function ReadAllEntries(ByRef iniEntries As ArrayList, Optional ByRef errorMessage As String = "") As Boolean

            If Not File.Exists(iniPath) Then
                errorMessage = "Ini file not found."
                Return False
            End If

            Try
                ' Read the ini file into an arraylist...
                Dim reader As StreamReader = New StreamReader(iniPath)
                iniEntries.Clear()

                Do Until reader.Peek = -1 'Until eof
                    iniEntries.Add(reader.ReadLine)
                Loop

                reader.Close()

            Catch ex As Exception
                ' The file's empty.
            End Try

            Return True

        End Function

        ' Error Message will be in theValue on failure.
        Public Function GetValue(ByVal theKey As String, ByRef theValue As String) As Boolean

            Dim iniEntries As New ArrayList
            Dim count As Int32 = 0
            Dim parts() As String = Nothing
            Dim tmp As String = ""
            Dim tmpKey As String = ""
            Dim tmpValue As String = ""

            ' Get the contents of the ini file.
            If Not ReadAllEntries(iniEntries, tmp) Then
                theValue = tmp
                Return False
            End If

            ' search for the key...
            If iniEntries.Count > 0 Then
                For count = 0 To iniEntries.Count - 1
                    tmp = CStr(iniEntries.Item(count))
                    parts = Split(tmp, keyValueSeparator)
                    tmpKey = parts(0)
                    tmpValue = parts(1)

                    ' Have we found it?
                    If theKey.ToLower.Trim = tmpKey.ToLower.Trim Then
                        theValue = tmpValue
                        Return True
                    End If
                Next

                theValue = "Entry not found."
            Else
                theValue = "No entries found in the ini file."
            End If

            Return False

        End Function

        Public Function RemoveEntry(ByVal theKey As String, ByVal theValue As String, _
                              Optional ByRef errorMessage As String = "") As Boolean

            Dim iniEntries As New ArrayList
            Dim count As Int32 = 0
            Dim tmp As String = ""
            Dim parts() As String = Nothing
            Dim tmpKey As String = ""
            Dim tmpValue As String = ""
            Dim entryRemoved As Boolean = False

            ' Get the contents of the ini file, and
            ' report an error reading from it, if any.
            If Not ReadAllEntries(iniEntries, tmp) Then
                errorMessage = tmp
                Return False
            End If

            ' Delete the original ini file.
            Try
                File.Delete(iniPath)
            Catch ex As Exception
                errorMessage = ex.Message
                Return False
            End Try

            ' Wait for it to be deleted...
            While File.Exists(iniPath)
                PauseWithoutBlockingUI(10)
            End While

            Try
                Dim writer As New StreamWriter(iniPath, False)

                If iniEntries.Count < 1 Then
                    errorMessage = "Entry does not exist."
                    Return False
                Else
                    For count = 0 To iniEntries.Count - 1
                        tmp = CStr(iniEntries.Item(count))
                        parts = Split(tmp, keyValueSeparator)
                        tmpKey = parts(0)
                        tmpValue = parts(1)

                        ' If we find the entry,
                        If theKey.ToLower.Trim = tmpKey.ToLower.Trim Then
                            ' Leave it out.
                            entryRemoved = True
                        Else
                            writer.WriteLine(tmp)
                        End If
                    Next

                End If

                writer.Close()

            Catch ex As Exception
                errorMessage = "Error writing ini file." & vbCrLf & vbCrLf & ex.Message
                Return False
            End Try

            If Not entryRemoved Then errorMessage = "Entry does not exist."
            Return entryRemoved

        End Function

        Public Function WriteEntry(ByVal theKey As String, ByVal theValue As String, _
                              Optional ByRef errorMessage As String = "") As Boolean

            Dim iniEntries As New ArrayList
            Dim count As Int32 = 0
            Dim tmp As String = ""
            Dim parts() As String = Nothing
            Dim tmpKey As String = ""
            Dim tmpValue As String = ""
            Dim valueWritten As Boolean = False

            ' If ini file doesn't exist, create it.
            If Not File.Exists(iniPath) Then
                Try
                    CreateFolders(GetFolderFromPath(iniPath))
                    Dim fs As New FileStream(iniPath, FileMode.Create)
                    fs.Close()
                Catch ex As Exception
                    errorMessage = "Could not create ini file: " & iniPath
                    Return False
                End Try
            End If

            ' Get the contents of the ini file, and
            ' report an error reading from it, if any.
            If Not ReadAllEntries(iniEntries, tmp) Then
                errorMessage = tmp
                Return False
            End If

            ' Delete the original ini file.
            Try
                File.Delete(iniPath)
            Catch ex As Exception
                errorMessage = ex.Message
                Return False
            End Try

            ' Wait for it to be deleted...
            While File.Exists(iniPath)
                PauseWithoutBlockingUI(10)
            End While

            Try
                Dim writer As New StreamWriter(iniPath, False)

                If iniEntries.Count < 1 Then
                    writer.WriteLine("" & theKey & keyValueSeparator & theValue & "")
                    valueWritten = True
                Else
                    For count = 0 To iniEntries.Count - 1
                        tmp = CStr(iniEntries.Item(count))
                        parts = Split(tmp, keyValueSeparator)
                        tmpKey = parts(0)
                        tmpValue = parts(1)

                        ' Modify ini file if the key already exists.
                        If theKey.ToLower.Trim = tmpKey.ToLower.Trim Then
                            writer.WriteLine("" & theKey & keyValueSeparator & theValue & "")
                            valueWritten = True
                        Else
                            writer.WriteLine(tmp)
                        End If
                    Next

                    ' Add it to the ini file if the key didn't exist in it already
                    If Not valueWritten Then
                        writer.WriteLine("" & theKey & keyValueSeparator & theValue & "")
                        valueWritten = True
                    End If

                End If

                writer.Close()

            Catch ex As Exception
                errorMessage = "Error writing ini file." & vbCrLf & vbCrLf & ex.Message
                Return False
            End Try

            Return valueWritten
        End Function

    End Class


Was This Post Helpful? 0
  • +
  • -

Page 1 of 1