Add new comment

can u help me how to backup and restore in vb6?, i got an error in my code "Operation is not allowed when the object is closed" if i remove the "Conn.Close" i got an error again "Run-time Error '70' Permission Denied" pls help me.. here is my email [email protected],just pm me, tnx

here is my code:

Private Sub Command1_Click()
Dim Source, Destination As String

Conn.Close
Source = App.Path & "\login.mdb"
Destination = App.Path & "\Backup\" & Format(Date, "mmmm dd, yyyy") & " " & Format(Time, "h_mm_ss") & ".mdb"
FileCopy Source, Destination

MsgBox " Backup!", vbInformation, ""
Conn.Open

End Sub

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • You may insert videos with [video:URL]
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <th> <img> <h1> <h2> <h3> <iframe> [video]
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <asp>, <c>, <cpp>, <csharp>, <css>, <html4strict>, <java>, <javascript>, <mysql>, <php>, <python>, <sql>, <vb>, <vbnet>. The supported tag styles are: <foo>, [foo].
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.