nswan - you cannot use datareader to bind to a datagrid in windows forms. Youll have to use a dataset


Dim data_adapter As SqlDataAdapter

data_adapter = New SqlDataAdapter("SELECT * FROM Contacts ORDER BY LastName, FirstName", objConn)

' Map Table to Contacts.
data_adapter.TableMappings.Add("Table", "Contacts")

' Fill the DataSet.
m_DataSet = New DataSet()
data_adapter.Fill(m_DataSet)

' Bind the DataGrid control to the Contacts DataTable.
datagrid1.DataSource = m_DataSet.Tables("Contacts")