>>The only weakness I have with this system is the fact that the login password for the user to the database is stored in the DBC unencrypted. Someone with access to the DBC with a tool that can read a DBF can easily find the login password and userid.<<
To get around this I ask for the password and then enter it into the connection and then open a view to be left open which allows subsequent views to be opened with the open shared connection. If you keep the Views DBC local and you do timestamp checking to update, you can check the DCX file's timestamp. The index file's timestamp dows not change with the password stuff.
**LogIn to the System -- If Oracle (or SQL*Server with no trusted Connection) open login to set shared connection
IF oApp.glOracle or (oApp.gSQLServer and not oApp.glTrusted)
PUBLIC lcUserId, lcPassword
OPEN database views
lcUserId=DBgetPROP("JKT9000", "Connection", "userid")
lcPassword=''
DO form zgetODBCpass && get userid and password
lcUserId=alltrim(lcUserId)
lcPassword=alltrim(lcPassword)
=DBsetPROP("JKT9000", "Connection", "DispLogin",3)
=DBsetPROP("JKT9000", "Connection", "userid",lcUserId)
=DBsetPROP("JKT9000", "Connection", "password",lcPassword)
USE views!v_login in 0 nodata
=DBsetPROP("JKT9000", "Connection", "DispLogin",1)
=DBsetPROP("JKT9000", "Connection", "password","")
Release lcUserId,lcPassword
ENDIF
kevin