Hi,
As state in my Title how can i export it on text file
By using Datasource.
Appreciate you help..
As state in my Title how can i export it on text file
By using Datasource.
VB.NET:
DataGridView.Columns.Clear()
Dim con As New SqlConnection(SQLConn)
con.Open()
Dim cmd As SqlCommand = con.CreateCommand
cmd.CommandText = "Select * from Table"
cmd.CommandType = CommandType.Text
Dim dr As SqlDataReader = cmd.ExecuteReader
Dim dt As New DataTable
dt.Load(dr)
DataGridView.DataSource = dt
Appreciate you help..