R
Roger
Hi:
Can anyone tell me why my datagrid doesn't populate with query results. For
some reason, I get "System.Byte[]" when I run the following query:
Dim oConn As OdbcConnection = New OdbcConnection("DSN")
Dim oCmd As OdbcCommand = New OdbcCommand("SELECT TOP 1 * FROM Table1",
gridConn)
Dim dr As OdbcDataReader
oConn.Open()
dr = oCmd.ExecuteReader()
If dr.HasRows() Then
dr.Read()
Label1.Text = dr.GetString(0)
Label2.Text = dr.GetString(1)
dr.Close()
oCmd.CommandText = "SELECT * FROM Table2"
dr = oCmd.ExecuteReader()
dg1.DataSource = dr
dg1.DataBind()
End If
Can anyone tell me why my datagrid doesn't populate with query results. For
some reason, I get "System.Byte[]" when I run the following query:
Dim oConn As OdbcConnection = New OdbcConnection("DSN")
Dim oCmd As OdbcCommand = New OdbcCommand("SELECT TOP 1 * FROM Table1",
gridConn)
Dim dr As OdbcDataReader
oConn.Open()
dr = oCmd.ExecuteReader()
If dr.HasRows() Then
dr.Read()
Label1.Text = dr.GetString(0)
Label2.Text = dr.GetString(1)
dr.Close()
oCmd.CommandText = "SELECT * FROM Table2"
dr = oCmd.ExecuteReader()
dg1.DataSource = dr
dg1.DataBind()
End If