>>I am converting an existing Foxpro 5.0 application to client/server, which will use Oracle as a backend database.
>>User ID and password are specified in the connection which is part of the database container in the front end. I left it empty so any user could log in to the backend with their own ID and password, which are entered upon starting our application. How could I pass this information as parameters to the connection?
>
>Assumptions:
>
>database=MyData
>connection=conOracle
>vueOracleTable = remote view from Oracle database
>cUser = memory variable containing User ID
>cPW = memory variable containing Password
>
>
>
>OPEN DATABASE MyData
>=DBSETPROP(conOracle,"CONNECTION","UserID",cUser)
>=DBSETPROP(conOracle,"CONNECTION","PassWord",cPW)
>USE vueOracleTable
John,
The only problem with your solution is that it makes a persistent change in the database. If multiple processes are using the same connection it's possible to run into a problem.
I've seen two solutions:
The first is where each workstation has a local database that contains all the connections and views. Then using DBSETPROP() to adjust the connection username and password would work fine, unless your running multiple instances of the app on the same workstation.
The second is to have the application log into the server using a single login.
This is a major problem, IMO!
-Mike