can't create an abstract class!!

puresmile

New member
Joined
Apr 9, 2006
Messages
1
Programming Experience
1-3
I'm making 3-layer architecture. while accessing database for login the application, i'm having following error.
cysh.jpg


here is the part of the code for data acess layer

PublicClass DataAccessLayerBaseClassHelper
PublicSharedFunction GetDataAccessLayer() As DataAccessLayerBaseClass
Dim trp As Type = Type.GetType(Globals.DataAccessType, True)
' Throw an error if wrong base type
IfNot trp.BaseType Is Type.GetType("loginTest.DataAccessLayer.DataAccessLayerBaseClass") Then
ThrowNew Exception("Data Access Layer does not inherit DataAccessLayerBaseClass!")
EndIf
Dim dc As DataAccessLayerBaseClass = CType(Activator.CreateInstance(trp), DataAccessLayerBaseClass)
Return dc
EndFunction'GetDataAccessLayer
EndClass'DataAccessLayerBaseClassHelper
EndNamespace'loginTest.DataAccessLayer

here is the code for MoPOSUsers.

'* STATIC METHODS *
PublicSharedFunction Authenticate(ByVal username AsString, ByVal password AsString) AsBoolean
If username IsNothingOrElse username.Length = 0 Then
ThrowNew ArgumentOutOfRangeException("username")
EndIf
If password IsNothingOrElse password.Length = 0 Then
ThrowNew ArgumentOutOfRangeException("password")
EndIf
Dim DBLayer As DataAccessLayerBaseClass = DataAccessLayerBaseClassHelper.GetDataAccessLayer()
Return DBLayer.Authenticate(username, password)
EndFunction'Authenticate

Can u help me in solving this problem?
 
Back
Top