Can't create Database backend?

Hi,

I’ve got an scheduled Agent that I want to create a database using .createFromTemplate(…)

Running the agent on my client everything works, but running it scheduled the database-file isn’t created.

I’ve inserted Print statements during the rutine and the DB-object is set, but when the agent is done I have no physical-file ??

I’ve even tried checking through the administrator, but still no file…

Is there some kind of setup in the server document or something like that preventing the server from creating the file??

Regards

Peter

Subject: re: creating a database in a back-end agent

This does require special access of the agent (I’m sure it must be a restricted operation) but if you’re getting past that statement without an error, I suspect that is not your problem.

Are you sure you’re looking for the database in the right place? Could it be that it’s set to not show in the open database dialog? If your code displays the db.Server and db.Filepath and you type in those exact values, can you find the DB that way?

Subject: re: tried it all, db object set but no file when done…

I’ve set the Agent runtime-securityLevel to level 3 (highest).

But yeah, I have a

if not db is nothing then Print |db is something|

and the log print “db is something”, so while the server is executing the code, the db object is set (through the template.createfromtemplate…)

But when it’s done, it’s like the file never existed. I’ve even tried printing the db.server and db.filepath as the last thing in the agent and it prints the correct server/path/filename, but as said = No File/Database…

Regarding the “show in the open database”, I’ve also tried to go through the Lotus Notes Administrator and look at the files on the server… No File…

Subject: On Error?

Do you by any chance have an On Error statement in your code that’s intercepting the access error generated by the CreateFromTemplate call, and ignoring it? It’s possible to have a NotesDatabase object that points to a database that doesn’t exist. You could check the IsOpen property and try to open the database if it is not open. If it really doesn’t exist that would generate an error. Also have a look at the IsPendingDelete flag.