База данных Access 2007 управления версиями и приложение

pip freeze перечисляет все установленные пакеты, даже если это не pip / easy_install. На CentOs / Redhat обнаружен пакет, установленный через rpm.

8
задан BIBD 13 July 2009 в 17:27
поделиться

2 ответа

Access 2007 has a feature where you can split a DB into its Tables/Queries (backend) and Forms/Reports (front-end). Since your question mentions only version controlling the forms and modules, this might be a more elegant solution. I don't know where modules go after the split, so that might be a stumbling block.

Microsoft offers VSTO (Visual Studio Tools for Office), which will let you develop in VS and run version control via any VS plugin (CVS/SVN/VSS/etc.).

Finally, you can just directly connect to Visual Source Safe. This MSKB article has some good information and background to go through, while this Office Online article is designed for getting you up and running.

Ultimately, I would suggest against taking the code out of Access if at all possible. Assuming the VBA editor is your primary development environment, you'll be adding extra steps to your development process that cannot easily be automated. Every change you make will need to be manually exported, diff'd, and stored, and there is no Application.OnCompile event that you could use to export the changes. Even tougher, you'll have to manually import all changed source files from other developers when they do checkins.

3
ответ дан 5 December 2019 в 21:21
поделиться

Я использую приведенный ниже код для извлечения кода vba из файлов Excel, вы можете изменить его для извлечения из Access.

Sub ExtractVBACode(strSource, objFSO, strExportPath, objLogFile)
Dim objExcel
Dim objWorkbook
Dim objVBComponent
Dim strFileSuffix
Dim strExportFolder


Set objExcel = CreateObject("Excel.Application")

objExcel.Visible = true

Set objWorkbook = objExcel.Workbooks.Open(Trim(strSource))

strExportFolder = strExportPath & objFSO.GetBaseName(objWorkbook.Name)

If Not objFSO.FolderExists(strExportFolder) Then
    objFSO.CreateFolder(strExportFolder)
End If

For Each objVBComponent In objWorkbook.VBProject.VBComponents
    Select Case objVBComponent.Type
        Case vbext_ct_ClassModule, vbext_ct_Document
            strFileSuffix = ".cls"
        Case vbext_ct_MSForm
            strFileSuffix = ".frm"
        Case vbext_ct_StdModule
            strFileSuffix = ".bas"
        Case Else
            strFileSuffix = ""
    End Select
    If strFileSuffix <> "" Then
        On Error Resume Next
        Err.Clear
        objVBComponent.Export strExportFolder & "\" & objVBComponent.Name & strFileSuffix
        If Err.Number <> 0 Then
            objLogFile.WriteLine ("Failed to export " & strExportFolder & "\" & objVBComponent.Name & strFileSuffix)
        Else
            objLogFile.WriteLine ("Export Successful: " & strExportFolder & "\" & objVBComponent.Name & strFileSuffix)
        End If
        On Error Goto 0
    End If
Next

objExcel.DisplayAlerts = False
objExcel.Quit

End Sub

Вы можете извлекать формы как Может быть, XML?

2
ответ дан 5 December 2019 в 21:21
поделиться
Другие вопросы по тегам:

Похожие вопросы: