Home > Software engineering >  Why in 2008 by VB.NET call view query data, the control DATAGRIDVIEWS does not display the data?
Why in 2008 by VB.NET call view query data, the control DATAGRIDVIEWS does not display the data?

Time:11-09

Small programs, ladies and gentlemen, may I write what is the problem? Why don't show on DATAGRIDVIEWS from essentially in the view of data? Procedure is as follows:
Public Sub BDDataGridView (ByVal DGV As DataGridView)
Dim objSqlConnection As New SqlConnection (" server=127.0.0.1; Integrated security=False; Initial Catalog=YNCSys; User ID=sa; The Pwd=adminsa226200 ")
ObjSqlConnection. The Open ()
Dim SQLCMD As New SqlCommand
SQLCMD=New SqlCommand (" select * from DDSeach ", objSqlConnection) 'DDSeach here as the view, with data in database,
Dim dt As New DataSet
Dim ds As New SqlDataAdapter
Ds. The Fill (dt)
DGV. The DataSource=dt. Tables (0). The DefaultView

End Sub
How to change again? Thanks for your bosses,
  • Related