NotesDatabase.CreateReplica problem

Ran into a bit of trouble using the CreateReplica method of the NotesDatabase class the other day.I found that the method worked fine when creating a local replica of a database on a server (7.0.2 FP2 on Debian Linux), but when trying to create a replica on the server it returned:

‘Notes Error: File does not exist (servername!!databasepath)’ (errorcode 4005)

The domino console showed that the database was created, however when trying to access this database it did not show up in the ‘open database’ dialog, nor in the administration client’s files view (even when set to show all filetypes), but on the OS level a nsf file was present, < 200KB with the original db being around 18MB since it was based on the DWA7 design.

When entering the database path manually in the ‘open database’ dialog, notes would return the file does not exist error.

Has anyone else seen this behaviour? (I’ve tested this both in R8.0 and R7.02 clients).

This code pulls a local replica, removes the server replica if doc count is the same for both replicas, then create a new replica on the server

dim s as new notes session

dim sdb as notesdatabase

dim ldb as notesdatabase

set sdb=s.getdatabase(“testserver/test”,“testdb.nsf”)

if sdb.isopen then

set ldb=sdb.createreplica("","testdb.nsf")

if ldb.isopen then

	if sdb.AllDocuments.Count = ldb.AllDocuments.Count then

		sdb.Remove

		set sdb = ldb.CreateReplica("testserver/test","testdb.nsf" 	' <-- triggers the error

‘Notes Error: File does not exist (testserver/test!!testdb.nsf)’ (errorcode 4005)

	end if

end if

end if