In Forms 10g you could set the userid parameter to something like "@TEST LOGON_SCREEN=YES" in a seperate config section in order to have the database name populated in the logon screen that a user is presented with.
I can't seem to get this to work in 11g, does anybody know how it can be achieved?
I'll answer my own question here, I got round this by doing the following in our menu form, if you haven't got a single menu form then you may need to do this in all your forms where the user isn't already logged on when the form opens.
right first off an on-logon trigger is required, I used the following: on-logon trigger
** Get the connection info
** If userid paramater in formsweb.cfg is set to '@<database>' or
** '@<database> login_screen=true' then this will put <database> into database field
** in default logon form
cn := Get_application_property(CONNECT_STRING);
if instr(cn,' ') > 0
cn := substr(cn,1,instr(cn,' ')-1);
then :global.login_success := 'TRUE';
Also, to deal with the situation where a user decides to click cancel in the logon screen, you need to put the following at the start of your wnfi trigger. when-new-forms-instance trigger
if :global.login_success != 'TRUE'