what is wrong in my code? i cant see the records of the dataBase
thanks in advancedCode:If (Not Page.IsPostBack) Then Dim con As SqlConnection = New SqlConnection ("Server=localhost;Database = Northwind;Integrated Security = SSPI;") Dim cmd As SqlCommand = New SqlCommand("select * from Customers", con) cmd.Connection.Open() Dim reader As SqlDataReader reader = cmd.ExecuteReader() datagrid1.DataSource = reader datagrid1.DataBind() cmd.Connection.Close() End If




Reply With Quote