AlStoughton
asked on
How to expose a .net Table Adapter's Data Adapter
I have a AVB.NET project working with SQL Server 2005 that includes a DataSet with Table Adapters and Binding Sources for several tables. I'd like to expose the Table Adapter's underlying DataAdapter so that I can monitor the progress of table fill operations using a Progress bar. A portion of the auto-generated code shows:
Partial Public Class vw_MI_RequisitionTableAdap ter
Inherits Global.System.ComponentMod el.Compone nt
Private WithEvents _adapter As Global.System.Data.SqlClie nt.SqlData Adapter
Private _connection As Global.System.Data.SqlClie nt.SqlConn ection
Private _commandCollection() As Global.System.Data.SqlClie nt.SqlComm and
Private _clearBeforeFill As Boolean
and I have tried to add a Partial Class as follows:
Public ReadOnly Property DataAdapter() As System.Data.SqlClient.SqlD ataAdapter
Get
'Here we return the private member of the tableadapter
Return _adapter
End Get
End Property
End Class
But the reference to _adapter is marked with the dreaded squiggly underline saying that it isn't declared.
What am I missing here. And from a broader viewpoint, is there a better eay to tie a Progress Bar to a data table Fill?
Thanks
Partial Public Class vw_MI_RequisitionTableAdap
Inherits Global.System.ComponentMod
Private WithEvents _adapter As Global.System.Data.SqlClie
Private _connection As Global.System.Data.SqlClie
Private _commandCollection() As Global.System.Data.SqlClie
Private _clearBeforeFill As Boolean
and I have tried to add a Partial Class as follows:
Public ReadOnly Property DataAdapter() As System.Data.SqlClient.SqlD
Get
'Here we return the private member of the tableadapter
Return _adapter
End Get
End Property
End Class
But the reference to _adapter is marked with the dreaded squiggly underline saying that it isn't declared.
What am I missing here. And from a broader viewpoint, is there a better eay to tie a Progress Bar to a data table Fill?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I double checked this morning. Good call on your part!! Silly oversight on mine.
Thanks for your input!
Thanks for your input!
NP. Glad to help :)
ASKER