KGRKJGETMRETU895U-589TY5MIGM5JGB5SDFESFREWTGR54TY
Server : Apache/2.4.62
System : FreeBSD fbsdweb2.web.rcn.net 14.1-RELEASE FreeBSD 14.1-RELEASE releng/14.1-n267679-10e31f0946d8 GENERIC amd64
User : www ( 80)
PHP Version : 8.3.8
Disable Function : NONE
Directory :  /domains/mguerinweb/Offline_Archive/vb asp to excel/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /domains/mguerinweb/Offline_Archive/vb asp to excel/modAccess.bas
Attribute VB_Name = "modAccess"
Private conn As ADODB.Connection
Private rs As ADODB.Recordset

Sub Initialize()
    Set conn = New ADODB.Connection
    Set rs = New ADODB.Recordset
End Sub

Sub OpenAccess()
    On Error GoTo ErrorHandler
    Dim strSql As String

    OpenConnection
    strSql = "SELECT * FROM custodial_data"
    rs.Open strSql, conn, adOpenKeyset, adLockBatchOptimistic
    
    With frmMain
        Set .grdNew.DataSource = rs
        .grdNew.Columns(0).Visible = False
    
        .cmdSave.Enabled = True
        .cmdRefresh.Enabled = True
        .cmdTransfer.Enabled = True
    End With

    Exit Sub
ErrorHandler:
    MsgBox Err.Number & ": " & Err.Description
    Resume Next
End Sub

Sub UpdateAccess()
    rs.UpdateBatch
End Sub

Sub OpenConnection()
    conn.CursorLocation = adUseClient
    conn.Open "DSN=GA"
End Sub

Sub CloseDatabase()
    If Not rs Is Nothing Then
        rs.Close
        Set rs = Nothing
    End If
End Sub

Sub CloseConnection()
    If Not rs Is Nothing Then
        conn.Close
        Set conn = Nothing
    End If
End Sub

Anon7 - 2021