Export Database to Notepad

Published: 28 October 2012
on channel: Ethup Bolt
3,286
1

##################EASY CODING WITH RICHARD####################
DIFFICULTY : 5

CODE FOR EXPORTING:
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
'
'Export To Text files

Dim Startuppath As String = Application.StartupPath + ---
Dim numCols As Integer = FacultyDataGridView.ColumnCount
Dim numRows As Integer = FacultyDataGridView.RowCount - 1
Dim Destinationpath As String = Startuppath & - & DateTime.Now.ToString(-dd-MMM-yyy-) & -.txt
Dim tw As TextWriter = New StreamWriter(Destinationpath)

For count As Integer = 0 To numCols - 1
tw.Write(FacultyDataGridView.Columns(count).HeaderText)
If (count -- numCols - 1) Then
tw.Write(-|-)

End If

Next
tw.WriteLine()
For count As Integer = 0 To numRows - 1
For count2 As Integer = 0 To numCols - 1
tw.Write(FacultyDataGridView.Rows(count).Cells(count2).Value)
If (count2 -- numCols) Then
tw.Write(-|-)

End If
Next
tw.WriteLine()
Next
tw.Close()

End Sub


On this page of the site you can watch the video online Export Database to Notepad with a duration of hours minute second in good quality, which was uploaded by the user Ethup Bolt 28 October 2012, share the link with friends and acquaintances, this video has already been watched 3,286 times on youtube and it was liked by 1 viewers. Enjoy your viewing!