Here's my translation.
"Hi, this is my first try using Lotus Notes and I've got a problem.
The program must open the Domino server programmatically and get data from the mail database. With their file [the Notes.INI? A list of mail DB file paths in another file?] it needs to open the NSF database. After the call to open the database it gets "Error opening database" [which is not enough of the error]. The Lotus client opens to the [document?] in three [clicks?], and the code I'm writing does not. What's the reason? Are there any restrictions accessing the database from [on?] the server? Help."
Some questions.
Show us your code.
Tell us what the says, exactly. For instance, in LotusScript, trap the error and show Error$. Show the code. Show what line generates the error.
How are you writing your code? Is it in an agent? Is it in its own program / EXE?
What language? Is it through C API? C#? Java?
Are you trying to run code on the server, that is on all the mail databases listed in a file? Or on a client, through the user's client installation?
Have you thought about writing an agent?
Where are you saving the data you're getting?
For answers to your questions:
We can't tell why you're unable to open the database. You got an error. That's all it says. It could be anything from the server / file path isn't correctly entered, to your Location document doesn't have it properly specified, to you're running on server and the server doesn't have authorization to open the database, to, you've mis-specified how to get to the database, to, the DLLs you need to load aren't available or the Notes.INI isn't located and so you don't have a mail DB ... well, you get the point.
For the record, if you're running an agent in say, LotusScript BASIC , the easiest way to open mail is NotesDatabase's method, "OpenMail". There's a nice sample of the code in the Help.
Code that's not in a Notes Application (an agent, for instance) must connect with the Notes DLLs and the Notes.INI through the PATH. Agents and code within a Notes application, they don't require this. For information how to set this up, I always resort to the Notes C API documentation. Yes, most of what it requires is also required for Java, though the Java requires more setup (which is in Domino's Java documentation).
Generally Notes access controls work on all database accesses. The only exception is programs that access the database locally.
What you can do in the Notes client, the server will grant you access to do from a program or an agent.
Programs require your Notes ID. Normally you login with your password.