CLanguage.cls

 VERSION 1.0 CLASS
BEGIN
  MultiUse = -1  'True
  Persistable = 0  'NotPersistable
  DataBindingBehavior = 0  'vbNone
  DataSourceBehavior  = 0  'vbNone
  MTSTransactionMode  = 0  'NotAnMTSObject
END
Attribute VB_Name = "cLanguage"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Private m_strLanguage_Name As String
Private m_intLanguage_Index As Integer
Private m_Conn As ADODB.Connection

Public Property Get Language_Name() As String
    Language_Name = m_strLanguage_Name
End Property

Public Property Let Language_Name(ByVal vNewValue As String)
    m_strLanguage_Name = vNewValue
End Property

Public Function GetLanguages() As ADODB.Recordset
    Dim rs As New ADODB.Recordset
    Dim strSQL As String
       
    'construct query string for recordset
    strSQL = "Select * from Languages order By Language_ID asc;"
    'set up a recordset object for patient
    rs.ActiveConnection = m_Conn
    rs.CursorLocation = adUseClient
    rs.CursorType = adOpenStatic
    rs.LockType = adLockOptimistic
    rs.Open strSQL

    If rs.EOF Then
        Set GetLanguages = Nothing
    Else
        Set GetLanguages = rs
    End If
    Set rs.ActiveConnection = Nothing

End Function
Private Sub Class_Initialize()
      
    Set m_Conn = New ADODB.Connection
    m_Conn.Open ConnectString
   
End Sub

Private Sub Class_Terminate()
    m_Conn.Close
    Set m_Conn = Nothing
End Sub

Public Property Get Language_Index() As Integer
    Language_Index = m_intLanguage_Index
End Property

Public Property Let Language_Index(ByVal vNewValue As Integer)
    m_intLanguage_Index = vNewValue
End Property

Project Homepage: