Mustinherit Problem

prav_roy

Well-known member
Joined
Sep 10, 2005
Messages
70
Location
Mumbai
Programming Experience
1-3
hi,
I have a base class which is of mustinherit type.. which has couple of constructors... and i am inhariting that class as..

My Base Class looks something like this

Public
MustInherit Class BaseServices
Private arrErrors As ArrayList
Protected objDb As DataAccess
Protected base_DA As SqlDataAdapter
Protected base_DS As DataSet
Protected base_CM As SqlCommandBuilder
'This constructor must be overloaded and called by all derived classes
Protected Sub New(ByVal db As DataAccess, ByVal sqlstr As String)
objDb = db
base_DA =
New SqlDataAdapter(sqlstr, objDb.Connection)
base_CM =
New SqlCommandBuilder(base_DA)
base_DS =
New DataSet()
base_DA.Fill(base_DS)
End Sub


My derived class looks like

Public Class SubClass inherits BaseServices
Public Sub New()
MyBase.New(New DataAccess, "select * from asset_master where 1=0")
End Sub
End
Class


but it throws an error saying that end of statement expected near inherits BaseServices, and also shows an error near
MyBase.New(New DataAccess, "select * from asset_master where 1=0")

Too many arguments to Public Sub New()

i am using VS 2005 and VB.Net..
 
Back
Top