All pastes #387190 Raw Edit

Something

public text v1 · immutable
·published 2007-03-09 04:21 UTC
rendered paste body
Private Sub Form_Load()
    ' We must initalize the databases
    
    Set Con = New ADODB.Connection
    Set Rst = New ADODB.Recordset
    
    Dim sCon As String
    Dim sSQL As String
    
    sCon = "Provider=Microsoft.Jet.OLEDB.4.0; " & "Data Source=" & App.Path & "\TinyIRC.mdb"
    
    Con.Open sCon
    
    MsgBox "DB Connection is opened", vbInformation, "Debug Mode"
    
    sSQL = "SELECT TOP 10 ServerName " & "FROM Connection"
    
    Set Rst = Con.Execute(sSQL)
    
    MsgBox "SQL Found - " & sSQL
    
    Do Until (Rst.EOF)
        cboServer.AddItem Rst("ServerName").Value
        Rst.MoveNext
    Loop
    
End Sub

Private Sub Form_Terminate()
    ' We must deinitalize the databases
    
    Set Con = Nothing
    Set Rst = Nothing
    
End Sub