|
I used it first: Dim binds As BindingSource = New BindingSource
Dim dt As DataTable = New DataTable
Dim da As Odbc.OdbcDataAdapter
Dim Conn As New Odbc.OdbcConnection
Conn = Me.comm.DBopen ()
da = New Odbc.OdbcDataAdapter (sSelectCmd, Conn)
da.Fill (dt)
binds.DataSource = dt
Me.DgViewReportCode.DataSource = binds
Me.BindingNavReportCode.BindingSource = bind
************************************************** *******
And then used it in another process
Dim dt1 As DataTable = New DataTable ()
dt1 = Me.DgViewReportCode.DataSource '' 'Error reported here
IsPaste = False
dt1.AcceptChanges ()
The error is: "Cannot convert System.Windows.Forms.BindingSource type to System.Data.DataTable type"
Why is it reporting such a mistake ... how to change it ????
(If I block the above *, the following is correct, but I cannot block any code above) |
|