Murray Brown
asked on
VB.net load first 500 lines of DataTable
Hi
I use the following code to populate a DataGridView.
Is it possible to load only the first 500 lines into the DataGridView
Dim oConnectionString As String = Globals.ThisAddIn.oRIGHT.l blConnecti onString.T ext
Dim con As SqlConnection = New SqlConnection(oConnectionS tring)
Dim sSQL As String = Globals.ThisAddIn.oBOTTOM. txtSQL.Tex t
con.Open()
Dim da As SqlDataAdapter = New SqlDataAdapter(sSQL, con)
da.Fill(ds, "MyTable")
DataGridView1.DataSource = ds.Tables("MyTable")
I use the following code to populate a DataGridView.
Is it possible to load only the first 500 lines into the DataGridView
Dim oConnectionString As String = Globals.ThisAddIn.oRIGHT.l
Dim con As SqlConnection = New SqlConnection(oConnectionS
Dim sSQL As String = Globals.ThisAddIn.oBOTTOM.
con.Open()
Dim da As SqlDataAdapter = New SqlDataAdapter(sSQL, con)
da.Fill(ds, "MyTable")
DataGridView1.DataSource = ds.Tables("MyTable")
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER