Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Microsoft Access > How To Rebuild ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 17 Topic 30207 of 30792
Post > Topic >>

How To Rebuild Objects From Text Files?

by Wayne <cqdigital@[EMAIL PROTECTED] > May 9, 2008 at 02:11 AM

I've read that one method of repairing a misbehaving database is to
save all database objects as text and then rebuild them from the text
files.  I've used the following code posted by Lyle Fairfield to
accomplish the first step:

Private Sub SaveObjectsAsText()
    path = CurrentProject.path & "\ObjectsAsText\"
    SaveDataAccessPagesAsText
    SaveFormsAsText
    SaveRe****tsAsText
    SaveModulesAsText
    MsgBox "All Done Saving Access Objects as Text"
End Sub


Private Sub SaveDataAccessPagesAsText()
    Dim FileName As String
    Dim Name As String
    Dim DataAccessPage As AccessObject
    For Each DataAccessPage In CurrentProject.AllDataAccessPages
        Name = DataAccessPages.Name
        FileName = path & Name & Format(Now(), "yyyymmddhhnn") &
".txt"
        SaveAsText acDataAccessPage, Name, FileName
    Next DataAccessPage
MsgBox "All Done Saving Data Access Pages as Text"
End Sub


Private Sub SaveFormsAsText()
    Dim FileName As String
    Dim Name As String
    Dim Form As AccessObject
    For Each Form In CurrentProject.AllForms
        Name = Form.Name
        FileName = path & Name & Format(Now(), "yyyymmddhhnn") &
".txt"
        SaveAsText acForm, Name, FileName
    Next Form
MsgBox "All Done Saving Forms as Text"
End Sub


Private Sub SaveRe****tsAsText()
    Dim FileName As String
    Dim Name As String
    Dim Re****t As AccessObject
    For Each Re****t In CurrentProject.AllRe****ts
        Name = Re****t.Name
        FileName = path & Name & Format(Now(), "yyyymmddhhnn") &
".txt"
        SaveAsText acRe****t, Name, FileName
    Next Re****t
MsgBox "All Done Saving Re****ts as Text"
End Sub


Private Sub SaveModulesAsText()
    Dim FileName As String
    Dim Name As String
    Dim Module As AccessObject
    For Each Module In CurrentProject.AllModules
        Name = Module.Name
        FileName = path & Name & Format(Now(), "yyyymmddhhnn") &
".txt"
        SaveAsText acModule, Name, FileName
    Next Module
MsgBox "All Done Saving Modules as Text"
End Sub

How do I then rebuild the database objects from the text files that
have been created?
 




 17 Posts in Topic:
How To Rebuild Objects From Text Files?
Wayne <cqdigital@[EMAI  2008-05-09 02:11:51 
Re: How To Rebuild Objects From Text Files?
lyle fairfield <lyle.f  2008-05-09 02:33:06 
Re: How To Rebuild Objects From Text Files?
"Rick Brandt" &  2008-05-09 06:08:38 
Re: How To Rebuild Objects From Text Files?
lyle fairfield <lyle.f  2008-05-09 05:55:26 
Re: How To Rebuild Objects From Text Files?
lyle fairfield <lyle.f  2008-05-09 06:38:42 
Re: How To Rebuild Objects From Text Files?
"Larry Linson"   2008-05-10 01:00:07 
Re: How To Rebuild Objects From Text Files?
lyle fairfield <lyle.f  2008-05-09 18:51:49 
Re: How To Rebuild Objects From Text Files?
"Larry Linson"   2008-05-11 22:01:45 
Re: How To Rebuild Objects From Text Files?
Wayne <cqdigital@[EMAI  2008-05-17 23:57:47 
Re: How To Rebuild Objects From Text Files?
lyle fairfield <lyle.f  2008-05-18 03:08:03 
Re: How To Rebuild Objects From Text Files?
Wayne <cqdigital@[EMAI  2008-05-18 03:55:47 
Re: How To Rebuild Objects From Text Files?
lyle fairfield <lyle.f  2008-05-18 07:01:37 
Re: How To Rebuild Objects From Text Files?
Wayne <cqdigital@[EMAI  2008-05-18 08:34:32 
Re: How To Rebuild Objects From Text Files?
lyle fairfield <lyle.f  2008-05-18 08:51:46 
Re: How To Rebuild Objects From Text Files?
Wayne <cqdigital@[EMAI  2008-05-18 22:49:30 
Re: How To Rebuild Objects From Text Files?
Chris Martin <nr.cmart  2008-05-23 09:26:11 
Re: How To Rebuild Objects From Text Files?
Wayne <cqdigital@[EMAI  2008-05-23 13:17:43 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Thu Jul 24 3:17:12 CDT 2008.