VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
END
Attribute VB_Name = "Interest"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = True
Function AddNew(ByVal strFileDSN As String, ByVal intCategoryID As Integer, ByVal strDescription As String)

    On Error GoTo ErrorHandler
    
    ' NYI
    
    Exit Function

ErrorHandler:
    
End Function

Function Update(ByVal strFileDSN As String, ByVal intInterestID As Integer, ByVal intCategoryID As Integer, ByVal strDescription As String)

    On Error GoTo ErrorHandler
    
    ' NYI
    
    Exit Function

ErrorHandler:

End Function

Function Remove(ByVal strFileDSN As String, ByVal intInterestID As Integer)

    On Error GoTo ErrorHandler
    
    ' NYI

    Exit Function

ErrorHandler:

End Function

Function ListAll(ByVal strFileDSN As String)

    Dim objContext As ObjectContext
    Set objContext = GetObjectContext
    
    On Error GoTo ErrorHandler
    
    Dim strSQL As String
    Dim rst As New ADODB.Recordset

    strSQL = "SELECT Interests.InterestID, " & _
                "Interests.InterestDescription, " & _
                "InterestCategories.Description " & _
             "FROM InterestCategories INNER JOIN Interests " & _
             "ON InterestCategories.CategoryID = Interests.CategoryID " & _
             "ORDER BY InterestCategories.SortOrder, Interests.InterestDescription"

    rst.CursorLocation = adUseServer
    rst.Open strSQL, "FILEDSN=" & strFileDSN, adOpenStatic, adLockReadOnly, adCmdText
    
    objContext.SetComplete
    
    Set ListAll = rst
    
    Exit Function
    
ErrorHandler:
    If Not rst Is Nothing Then Set rst = Nothing
        
    objContext.SetAbort
    Err.Raise Err.Number, "Interest.ListAll()", Err.Description

End Function

