Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to maintain security, do not specify the password ?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00291220
Message ID:
00291347
Vues:
16
>>I'm using ORACLE 7.3 ver 2.5 ODBC Driver (sqo32_73.dll) to connect to ORACLE7 DATABASE, and want to maintain security, do not specify the password when setting up the connection in the DBC. I can´t to explicitly include the DBC in the project. <<


If I understand you correctly -- you do not want to hard code the password in the DBC connection (a good idea). If this is is you issue, then a possible suggestion is to Get the Oracle ID and Password via a dialog box and then force the password into the connection when you need to. The example below shows where you can get the password, put it into the DBC and then open a table via the connection. If you use shared connections and leave this table open, then all subsequent table opening will not need password handling. If you can not leave a connection open all the time, then you will need to handle the security every time.

OPEN database MyDBC
lcUserId=DBgetPROP("cConnectName", "Connection", "userid") && get id
lcPassword='' && force password entry
DO form frmGetODBCpass with lcUserID,lcPassword && get user id and password
lcUserId=alltrim(lcUserId)
lcPassword=alltrim(lcPassword)
=DBsetPROP("cConnectName", "Connection", "DispLogin",3) && Never show dialog
=DBsetPROP("cConnectName", "Connection", "userid",lcUserId) && put in id
=DBsetPROP("cConnectName", "Connection", "password",lcPassword) && put in PW
USE views!v_login in 0 nodata && opening view with shared connection
=DBsetPROP("cConnectName", "Connection", "DispLogin",1) && show login dialog
=DBsetPROP("cConnectName", "Connection", "password","") && clear PW
Release lcUserId,lcPassword

Kevin
Kevin Emmrich
www.jkt9000.com
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform