Christopher Schipper
6/14/2002 7:44:00 PM
The table has 9 records(rows) and with oledb, returned all into datagrid.
Now returns none.
Thanks,
Chris
(single form with 1 datagrid.)
------------------------------------------------------------
Imports Microsoft.Data.Odbc
Public Class Form1
Inherits System.Windows.Forms.Form
Public DV As DataView
Public DS As DataSet
Public DT As DataTable
Public CN As OdbcConnection
Public DA As OdbcDataAdapter
#Region " Windows Form Designer generated code "
#End Region
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs)
Handles MyBase.Load
DT = New DataTable()
DS = New DataSet()
CN = New OdbcConnection()
CN.ConnectionString = "Driver={Sql
Server};Server=localhost;Trusted_connection=true;"
DA = New OdbcDataAdapter()
DA.MissingSchemaAction = MissingSchemaAction.AddWithKey
DA.SelectCommand = New OdbcCommand("SELECT * FROM SomeTable", CN)
DA.Fill(DS, "SomeTable")
DA.Fill(DT)
DataGrid1.SetDataBinding(DS, "Other_Tracking")
End Sub
End Class