Has anyone had their .dvb files 'go bad?'

Discussion in 'AutoCAD' started by Mark Propst, Sep 10, 2003.

  1. Mark Propst

    Mark Propst Guest

    Maybe I should have kept them refrigerated?!?

    I seem to have several .dvb projects that have something wrong.
    When I try to load them from vbaman I get an alert box saying "failed to
    load project from the file"

    I transfer files from home to work on a portable usb harddrive. I hope that
    file transfer isn't a problem with corrupting files? but that's the only
    thing I can think of.

    the copying function to move files from drive to drive is
    cf.CopyFileFromTo strSourceFilename, strTargetFilename

    where cf is a class with method thus:
    Sub CopyFileFromTo(sSourceFileName As String, sDestinationFileName As
    String)
    Dim fso As FileSystemObject
    Set fso = CreateObject("Scripting.FileSystemObject")
    Dim objFileToCopy As File
    Set objFileToCopy = fso.GetFile(sSourceFileName)
    'debug.Print "File to copy name is : " & objFileToCopy.Name
    On Error Resume Next
    objFileToCopy.Copy sDestinationFileName
    If Err Then
    MsgBox Err.Description
    Err.Clear
    End If

    Set fso = Nothing
    Set objFileToCopy = Nothing
    End Sub


    The only other possibility may be if I open a bas module in vb and save it,
    could that corrupt the bas file for vba? except the dvb doesn't read the bas
    files, it has its own internal modules in the dvb itself, rather than
    "xreffing" the .bas files on disk. and I'm pretty sure I can't open a .dvb
    file in vb....?

    Any thoughts, and any ideas how to 'uncorrupt' them?

    maybe clorox and a wire brush?

    tia
    mark
     
    Mark Propst, Sep 10, 2003
    #1
  2. Mark Propst

    Trevor Guest

    Mark,

    I've had this problem. I can usually recover my .DVBs by using VBAMAN >
    SaveAs... I've also noticed that doing a saveas this way often creates a
    much smaller .DVB, so maybe it's a good idea to saveas once in a while just
    to "purge."

    If you're having problems transferring DVB files from one computer to
    another, I would carefully check any references to make sure everything is
    consistent from machine to machine. VB can be really picky about
    references, particulary if it's a non-standard control on a form.
     
    Trevor, Sep 10, 2003
    #2
  3. Mark Propst

    Mark Propst Guest

    Thanks Trevor,
    I had forgotten about the saveas trick, I'll try that

    any ideas what corrupts them in the first place?
    I don't seem to have any problems with the references, and yes I do try to
    assure that refs are on both machines, this was just a case where the dvb
    simply would not load, let alone have missing refs.
    I have also messed myself up in the past by creating or modfiying a form or
    class in vb, using something not supported in vba, but again, that's not the
    current issue.

    Thanks for the response.
    Glad someone else was burning the midnight oil too.
    Or Maybe you're in Australia?
    Mark
     
    Mark Propst, Sep 10, 2003
    #3
  4. Mark Propst

    Mark Propst Guest

    well I tried that idea, but you have to have it loaded to do a save as and
    since I can't load it, i can't do a save as
    :(
    thanks for the idea though
    Mark
    theres' no such thing as 'recover' or 'audit' for dvb files is there?
     
    Mark Propst, Sep 10, 2003
    #4
  5. Mark Propst

    Jaime Guest

    is it password protected?? ive had problems where things wont load if a
    referecne happened to go missing.

    Jaime
     
    Jaime, Sep 10, 2003
    #5
  6. Mark Propst

    Ed Jobe Guest

    I've had some get corrupted due to saving the project when there were
    compile errors. It was the end of the day, I saved and went home. Came back
    the next morning and surprize! I forgot how I fixed it, but when I got back
    into it, I found I had a compile error I missed. Something like a misspelled
    variable name with Option Explicit. Now I have the habit of always doing
    Debug>Compile before I save. The only thing that has saved me is that I
    develop with a2ki on an XP machine. I have been able to open a corrupted dvb
    on another machine running NT. When that doesn't work, the only avenue left
    was to get an older backup copy and redo the lost work.

    FYI for MS Access developers. There is an undocumented startup switch -
    /decompile. This strips the compiled code from the mdb and forces a
    recompile from the pseudo code. Always back up your mdb before trying this.
     
    Ed Jobe, Sep 10, 2003
    #6
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.