Access Integration

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
phenderson
Posts: 5
Joined: Fri Mar 17, 2006 9:24 am

Access Integration

Post by phenderson » Fri Mar 17, 2006 10:17 am

I'm pretty new to Vault, but am very interested in it. We're currently developing several projects in Access and was wondering what level, if any, of integration Vault has with it.

Thanks!

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Post by lbauer » Fri Mar 17, 2006 11:24 am

Vault has no specific integration with Access. It would treat an Access database file like any other file. Vault wouldn't version specific elements, such as queries or forms, etc.
Linda Bauer
SourceGear
Technical Support Manager

JimHugh
Posts: 6
Joined: Thu Jan 19, 2006 10:06 am
Location: Davis, CA

Post by JimHugh » Fri Mar 17, 2006 3:45 pm

You may want to take a look at http://www.microsoft.com/downloads/deta ... laylang=en

The following code could also be used as a bridge.

Load it into an Access Module

Code: Select all

Option Explicit
Public Sub DocDatabase()
 '====================================================================
 ' Name:    DocDatabase
 ' Purpose: Documents the database to a series of text files
 '
 ' Author:  Arvin Meyer
 ' Date:    June 02, 1999
 ' Comment: Uses the undocumented [Application.SaveAsText] syntax
 '          To reload use the syntax [Application.LoadFromText]
 '====================================================================
On Error GoTo Err_DocDatabase
Dim dbs As Database
Dim cnt As Container
Dim doc As Document
Dim i As Integer
Const docpath = "C:\mdb\"
Set dbs = CurrentDb() ' use CurrentDb() to refresh Collections

Set cnt = dbs.Containers("Forms")
For Each doc In cnt.Documents
    Application.SaveAsText acForm, doc.Name, docpath & "Forms." & doc.Name & ".txt"
Next doc

Set cnt = dbs.Containers("Reports")
For Each doc In cnt.Documents
    Application.SaveAsText acReport, doc.Name, docpath & "Reports." & doc.Name & ".txt"
Next doc

Set cnt = dbs.Containers("Scripts")
For Each doc In cnt.Documents
    Application.SaveAsText acMacro, doc.Name, docpath & "Scripts." & doc.Name & ".txt"
Next doc

Set cnt = dbs.Containers("Modules")
For Each doc In cnt.Documents
    Application.SaveAsText acModule, doc.Name, docpath & "Modules." & doc.Name & ".txt"
Next doc

Set cnt = dbs.Containers("Modules")
For Each doc In cnt.Documents
    Application.SaveAsText acModule, doc.Name, docpath & "Modules." & doc.Name & ".txt"
Next doc

For i = 0 To dbs.QueryDefs.Count - 1
    Application.SaveAsText acQuery, dbs.QueryDefs(i).Name, docpath & "QueryDefs." & dbs.QueryDefs(i).Name & ".txt"
Next i

Set doc = Nothing
Set cnt = Nothing
Set dbs = Nothing

Exit_DocDatabase:
    Exit Sub


Err_DocDatabase:
    Select Case Err

    Case Else
        MsgBox Err.Description
        Resume Exit_DocDatabase
    End Select

End Sub

' LoadFromText acForm, "FormName", "C:\TempFile.txt"
Jim Hughes

Post Reply