I write a dbdriver (as described in c-api samples\misc\dbdrive). How can I get the database which is currently selected on workspace?TeamStudio utility and scanEZ can do it, thus it is possible.
Help please
I write a dbdriver (as described in c-api samples\misc\dbdrive). How can I get the database which is currently selected on workspace?TeamStudio utility and scanEZ can do it, thus it is possible.
Help please
Subject: DBDRIVER: how to determine which db is selected on workspace?
It is very easy (although I’ve been doing this since Notes 3.3, so maybe it just seems easy now). In the call
STATUS LNPUBLIC
DBDSetOpenContext(DBVEC far *vec, HDBDSESSION hSession,
char far *DefaultDBName, DBOPENBYIDPROC Proc,
HANDLE hNames, DWORD hParentWnd)
the third argument is the DefaultDBName. Copy this into someplace where you can use it later and you have the default database. This could be a line as simple as
strcpy (database_default, DefaultDBName);
To break it into its component parts, just use
sError = OSPathNetParse (database_default, NULL,
server,
filepath);
Subject: It works, thanks. Another question…
It there any way to pass several DBs? :)I’ve selected three bases and click on the button, and all three bases are know in the code…
Guess not, but…
Subject: *I can’t recall. I’ll see if I can dig it up.