Mega Code Archive

 
Categories / Delphi / ADO Database
 

Database login for multiple clients

Question: Since the middle tier is doing the database access on behalf of multiple thin clients, do we lose the ability to associate a particular database user ID with a particular human user? This would seem to be a problem if you want to grant different access rights to different groups of users at the database level. Answer: Yes, if you want to use one connection to the database for all clients. If you want, you can have the clients login to the database. To do this, create an automation method on the RemoteDataModule that takes the user name and password and use that to login to the database. Also, drop a TSession on your RemoteDataModule and set it's AutoSessionName property to True.