|
-
Jun 21st, 2000, 07:03 PM
#1
Thread Starter
Lively Member
Hello,
I open the database at the start of a program. I want to know whether i can temp close the database for backing up procedures to take place and then reopen it whilst the program is still operating. I have this to open the database:
Function OpenDataBase(ByVal pDatabasName As String) As Boolean
On Error GoTo OpenDataBaseError
Set pWorkspace = Workspaces(0)
Set pDatabase = pWorkspace.OpenDataBase(App.Path & "\" & pDatabasName, False, False, ";PWD=c00rpar00")
OpenDataBase = True
Exit Function
OpenDataBaseError:
Select Case Err
Case Else
MsgBox "Error#" & Err.Number & " " & Err.Description, vbInformation, App.Title
End Select
OpenDataBase = False
End Function
Is it as simple as I think.... changing OpenDatabase = true to false <= i assume that this will close it and just reopen it the same way? I just need clarification that this would work. Thanks for any help.
Mike
-
Jun 21st, 2000, 11:39 PM
#2
Guru
I'm assuming pDatabase is a global variable, so you'd just have to use pDatabase.Close (or whatever the DAO equivalent is)
you can then manipulate your DB
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|