Adding info from a database to a DataGrid

bouki's Avatar, Join Date: Apr 2010
Go4Expert Member
I have selected the info that i want from my database but im unaware of the syntax need to be used to add them to the datagrid.

The datagrid has the column...BookName, DateRetun and DateIssued. Can anyone tell me how to approach this please.

Code:
  cn.ConnectionString = "data source = Rayon\Rayon; initial catalog = library; uid=sa; password=minnie"
        cn.Open()
        cmd.Connection = cn
        cmd.CommandType = cmd.CommandText
        cmd.CommandText = " select BookName, DateIssued, DateReturn from Book, BookReturn, BookBorrow" & "where " bookreturn.isbnno = Book.ISBNno and  BookBorrow.ISBNno = Book.ISBNno"
        rdr = cmd.ExecuteReader
0