Jump to content

Bimmer

uniGUI Subscriber
  • Posts

    12
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Bimmer's Achievements

Newbie

Newbie (1/4)

3

Reputation

  1. Thanks. And yes I can explain. We have a setup where all users are registerede in a user database that we maintain ourself. We could go with some sevice that provides this - but we found a way to do it ourselves. We have developed an api (not unigui - with dmvc framework (Daniele Teti) - that handles our login and returns information when login is validated. So I want to use this in the sample application from unigui. And is thinking something like this would be ok. procedure TfrmLogin.btnLoginClick(Sender: TObject); var lUserdatabase: string; begin if THandlerAuth.Login(edMail.text, edPassword.text, lUserdatabase) then begin if UniMainModule.SetupDatabaseConnection(lUserdataBase) then ModalResult := mrOK; end; end; This scenario only accepts 1 database. But it could be different for each user. I already have the handler working - since its based on working api solution. So all I need is confirmation that this is the way to go for a unigui application.
  2. The user is only connected to one database - at any given time. The userdatabase is not a part of this - and is accessed via rest-api. So when the user selects one of the three databases - I can just setup the TFDConnection on my datamodule for the users session?
  3. Hi all. I'm currently looking into how we can build an application where users are to login (via rest call to our existing user database) - and when granted authorization the user should get a selection of databases to choose from. In case that only one database is available for the user loging in - then no selection is needed and the user is just granted access to the database. How can this be implemented with the example : http://www.unigui.com/doc/online_help/small-login-form.htm
  4. This problem - is not a problem. This happens because I did not clear params of my connection. Having a blank setup page like this. is not the same as - "there are no params"! I made the error of reusing an earlier FDConnection component ... and that cost me some hours of debugging 😕 And that will give the error - that the connection cannot be pooled. Thanks all for your help in trying to help me along. And I hope this information can help others as well.
  5. I found a demo app - "DBLookupComboBox - Custom Remote Query" It uses pooled connection. But is doing it with a private setup. Let me try and modify the sample app to use a persistent setup. And see if it fails like my app. I will report back later.
  6. Hi AlexM123. I will check if it can explain my situation. Thanks.
  7. Hi Sherzod - and thanks for joining my quest 🙂 Trying to use a connections.ini file with the setting - pooled=true - I get the following error when doing my login and connecting to the database. Project SkyPOS.exe raised exception class EFDException with message '[FireDAC][Comp][Clnt]-507. Connection [DBConn: TFDConnection] cannot be pooled. Possible reason: connection definition is not in the FDManager.ConnectionDefs list or TFDConnection.Params has additional parameters'. And I now that this indicates that the setup i wrong somehow. But I'm only setting the ConnectionDefName of the TFDConnection. And by doing that I should have what is defined as a persistent connection definiton link to info here -> https://docwiki.embarcadero.com/RADStudio/Alexandria/en/Defining_Connection_(FireDAC) The connection is in the ConnectionDefs list - I know that because I've tried listing all connections on the login form. And all is correctly listed.
  8. Starting to build our first UniGui project I face myself in a situation I need an answer to. With a standard unigui login form. I would like to be able to have multiple databases available. Not for selection - but via the users login, through our user-api that handles auth. The database alias (an entry in firedac connections file - ConnectionDefName) is returned from our api and I now need to set the name on the TFDConnection. function TUniMainModule.ChooseDatabaseConnection(aDatabaseConnectionDefName: string): boolean; begin if FDManager.IsConnectionDef(aDatabaseConnectionDefName) then begin DBConn.Close; DBConn.ConnectionDefName := aDatabaseConnectionDefName; end; end; This works - but only if the setting - POOLED is set to false in my connections file. I'm loading FDDrivers.ini (specific different vendor files) in the Creation of the servermodule. And the Connections.ini (databases) is loaded in mainmodule creation. Should I do anything specific to be able to use pooled=true ?
  9. Thank you @Sherzod it is working.
  10. I'm having problem accessing the uniGUI Development forum. I'm a member of a team - with a different email than the general account used to purchase uniGUI. I got an email with portal login for my team member email. And I can login Same email is used for this forum account - and I can login here (different password of course). But I still cannot access Development forum. Any further settings I need to adjust?
×
×
  • Create New...