Re: ? Passing userid/password

From: M.W. Stern <MStern_at_massey.ac.nz>
Date: Thu, 1 Jul 93 22:15:47 GMT
Message-ID: <1993Jul1.221547.25126_at_massey.ac.nz>


>> Does anyone know how to pass the userid and password from a form to a C
>> program that uses EXEC SQL statements? I am using the HOST command
>> attached to the Key-print trigger in forms to execute the C program and I
>> would rather not have to login again.
>
>I've asked Oracle about this in the past, and they've told me it's not
>possible (this was under forms 2.3/Oracle 5). For security reasons, it
>shouldn't be possible anyway, otherwise anybody could write a form to
>extract usernames & passwords.
>Have you considered converting the program to a user exit? That way,
>you don't need to log in again -- you have the same database login
>as is used by forms.

I wanted to do this some time ago, so I'm a bit rusty but a possible solution (using Forms 3.0 and Menus 2(?)) is to assign the user and password to global variable from Menus (using &user (?), its in the manual anyway) which is then accessable from a form if the form and menus are linked (or something). This allows you to run SQLPLUS stuff etc from a form, without having to make the user supply a password. Remember multiple logins under DOS are a little weird.

I agree that the cleanest way is to use user exits so that another login is not required. But as a quick hack (for prototyping say) the above works (I think, it was quite some time ago and I'm not sure how successful it was, but I'm confident it worked in theory).

Mark Stern
M.W.Stern_at_massey.ac.nz Received on Fri Jul 02 1993 - 00:15:47 CEST

Original text of this message