Notes Error Database Has Not Been Opened Yet
been opened yet; NotesDatabase; handle; NotesDBDirectory; object; NotesSession.AddressBooks; Open method; New NotesDatabase; error; dbLookup.GetView Technote (troubleshooting) Problem A "Database has not been opened yet" error occurs when you try to use a LotusScript NotesDatabase object in ways that require the database to be "open," and it is not open at that time. The IsOpen property will tell you whether the database is open. See the description of IsOpen for a list of properties that are available when the database is not open. Cause If you get the NotesDatabase handle from a NotesDBDirectory object or from NotesSession.AddressBooks, it is not open until you call the Open method on it. But if you get the object in another way, for example, using New NotesDatabase with non-blank server and filepath arguments, the database is normally opened at the same time. The cause of the problem is the line of code that creates the NotesDatabase object. However, the error does not occur until later when you try to use the object in a way that requires it to be open. Dim dbLookup As New NotesDatabase(dbThis.Server, "folder\lookup.nsf") ' problem is here: database does not exist Set view = dbLookup.GetView("Keywords") ' error occurs here Possible causes of the problem are: There is no such database at the path you specified. The ID running the code does not have access to open the database. The database file is damaged and cannot be opened. When specifying server name, "" (empty string) may only be used when the database is local to the computer executing the code. If the code runs on the server (for instance, a scheduled agent), you should use "" for other databases on the same server. If the code is run from a workstation, a server name of "" can only find databases stored locally on the workstation. This is true even if the code is stored on the server -- for instance, if a user uses the Actions menu to execute an agent in a server replica of an application. The question is not, where is the code stored, but which computer is running it? The full filepath (e.g. "C:\notes\data\r_apps\haha.nsf") may optionally be used when accessing local databases on a workstation. If you specify a server name, however, or if the code is running on a server, you must use the path relative to the Notes data directory ("r_apps\haha.nsf"). This is a security feature. Resolving the problem Notes is working as designed. Use the LotusScript debugger, or insert some debugging output statements, to see the exact values of the strings you're passing as arguments. Make sure they have the
Training Support Forums & community Events Rational Tivoli WebSphere Java technology Linux Open source SOA and Web services Web development XML My developerWorks About dW Submit content Feedback developerWorks>Lotus>Forums & community>Notes/Domino 6 and 7 Forum Notes/Domino 6 and 7 Forum Database has not been opened yet - LotusScript error Sign in to participate Previous Next Database has not been opened yet - LotusScript errorPosted by Andre Guirard on 31.May.08 at 09:27 AM using Lotus NotesCategory: Domino DesignerRelease: 7.0.2Platform: All Platforms This error occurs when you try to use a NotesDatabase object in ways that require it to be "open," http://www-01.ibm.com/support/docview.wss?uid=swg21308538 and it is not open at that time. The IsOpen property will tell you whether the database is open. See the description of IsOpen for a list of properties that are available when the database is not open. If you get the NotesDatabase handle from a NotesDBDirectory object or from NotesSession.AddressBooks, it is not open until you call the Open method on it. But if you get the http://www-10.lotus.com/ldd/nd6forum.nsf/DateAllFlatweb/b028fc9a1cddaa038525745a0049e508?OpenDocument object in another way, for instance using New NotesDatabase, the database is normally opened at the same time. So, the cause of the problem is the line of code that creates the NotesDatabase object. However, the error doesn't occur until later on, when you try to use the object in a way that requires it to be open. Dim dbLookup As New NotesDatabase(dbThis.Server, "resc\lookup.nsf") ' problem here: database doesn't exist. Set view = dbLookup.GetView("Keywords") ' error occurs here. Possible causes of the problem are: There is no such database at the path you specified. The ID running the code doesn't have access to open the database. The database file is damaged somehow and can't be opened. ... Use the LotusScript debugger, or insert some debugging output statements, to see the exact values of the strings you're passing as arguments. Make sure they have the values you expect. If the values are correct, try to open the application manually, from the Notes client menus, using the exact same server name, filepath and Notes userID as was used by the code. The resulting error message should tell the cause of the failure. Return to top Database has not been open yet (B Dali 31.May.08)
IBM Lotus Messaging and Collaboration Clients View All Domino Web Access (iNotes) Lotus Notes 5 Lotus Notes 6 Lotus Notes 7 Lotus Sametime Instant Messaging Mobile Devices IBM Lotus Messaging and Collaboration Clients View All Domino Web Access http://searchdomino.techtarget.com/answer/Resolve-Notes-8-migration-error-Database-has-not-been-opened-yet (iNotes) Lotus Notes 5 Lotus Notes 6 Lotus Notes 7 Lotus Notes 8 Lotus Sametime Instant Messaging Mobile Devices IBM Lotus Messaging and Collaboration Servers View All IBM WebSphere Lotus Domino Server 5 Lotus Domino Server 6 Lotus Domino Server 7 Lotus Domino Server 8 Lotus Quickr Notes/Domino Administration View All Domino Directory Administration Tools AdminP LDAP Calendar and Contact notes error Management Interoperability Licensing Monitoring and Logging Performance User Settings Notes.ini Notes/Domino Coding and Development View All Ajax Development Security Eclipse HTML J2EE Java JavaScript LEI and DECS Domino Designer Agents Application Development Formula LotusScript Mobile and Wireless Development Web Development XML and Web Services Notes/Domino Data Management and Storage View All Archiving Backup and Recovery Clustering Database Management Hardware Management Mailbox notes error database Management Replication and Synchronization Storage Management Notes/Domino Deployment and Migration View All Deployment and Migration Advice Deployment and Migration Tools Notes/Domino Security View All Compliance Management Compliance tools Access, Permissions and Authentication Antispam Software and Spam Filtering Antivirus Software and Virus Protection Email Compliance Email Encryption Firewalls Password Management Phishing and Email Fraud Protection Policy Management Topics Archive View All Domino Resources Domino Resources - Part 2 Domino Resources - Part 3 Domino Resources - Part 4 Domino Resources - Part 5 Domino Resources - Part 6 Domino Resources - Part 7 Domino Resources - Part 8 Please select a category IBM Lotus Messaging and Collaboration Clients IBM Lotus Messaging and Collaboration Servers Notes/Domino Administration Notes/Domino Coding and Development Notes/Domino Data Management and Storage Notes/Domino Deployment and Migration Notes/Domino Security Section Problem Solve News Get Started Evaluate Manage Problem Solve Sponsored Communities Q Resolve Notes 8 migration error: 'Database has not been opened yet' byBrad Balassaitis Upon moving to Lotus Notes 8, some Lotus Notes users received an error message stating: 'Database has not been opened yet.' Find out why