I am currently writing my first application in VB.Net and have come accross
the following problem, my code is as follows
'Alllocate memory for class objects
m_oBusiness = New Validation()
m_oGetMethods = New RetrieveData()
m_oDataReader = New SqlDataReader()
lnResult = IIf(m_oGetMethods.GetList("Users", m_oDataReader) = 0, True,
False)
If lnResult = 0 Then
With m_oDataReader
'Run through table adding club names to list box for selection
Do Until .Read = True
'need to subtract 1 from clubkey as index of combo starts at 0
and database starts at 1
cmbClubName.Items.Insert(.Item("Club_Key") - 1,
Trim(.Item("Club_Name")))
Loop
End With
End if
when i do the line "m_oDataReader = New SqlDataReader()" to allocate the
memory the folloing error appears on building
C:\Documents and Settings\Stuart\My Documents\Visual Studio
Projects\HCapCalc\HCalc_UI\frmLogin.vb(261):
'System.Data.SqlClient.SqlDataReader.Private Overloads Sub New(command As
System.Data.SqlClient.SqlCommand)' is not accessible in this context because
it is 'Private'.
I wondered if anyone had come accross this before
Any help would be appreciated
Best Wishes
Stuart Ferguson