Forum > Databases

datamodule - please do NOT log me in

(1/2) > >>

Nicole:
When I open my lazarus-project, a login prompt pops up, asking for my database password.

At the moment, I just want to work with my code and not key in passwords.
How can I get rid of this hello-screen (created by my datamodul)?

I disabled prompts wherever I could and keyed in the password in the masks I thought, it would stop asking-for-password.

or in other words:
I would prefer the result-situation, if I click "cancel" in this dialog, - but without dialog.

Zoran:
You didn't provide details, but this is probably the case - on that datamodule you have some database component and this database component has "connected" property set to true, so it tries to connect to underlying database in design time.

Set this property to false in object inspector, so that it does not connect in design time and set it to true in code, so it will connect in runtime only.

Sometimes, you might need active connection in design time, eg. if you want persistent fields in some query component - then you can set connected to true in object inpector, open the transaction and query, create the fields, but then after the fields had been created, you can set connected to false again.

MarkMLl:
Nicole, you are starting a lot of threads about very similar issues. Looking at one of your older ones, please note my comment that you will get into deep water if editing the content of a frame after it has been placed on a form.

In other words, /if/ your datamodule etc. is in a frame, make sure that the connected property of the relevant controls was set false when designing the frame.

MarkMLl

rvk:

--- Quote from: Nicole on August 25, 2022, 08:56:28 am ---When I open my lazarus-project, a login prompt pops up, asking for my database password.

--- End quote ---
Actually I noticed this too in IBX.
But first... did you set the Login Prompt in the object inspector (left side) of TIBDatabase to false?
If yes... did you put this in the Params?

--- Quote ---user_name=SYSDBA
password=masterkey
--- End quote ---

If yes... then this seems to be a bug.
When switching to Connected = true in design-time I also get a login prompt.
It shouldn't happen if you set Login prompt to false and the correct Params.
It should use these settings to automatically login and connect.
(Or we missed something...)

(My settings are correct because I have a simple program that does nothing but IBDatabase.Connected := true and at runtime it doesn't prompt me for login. Just only at design time.

Nicole:
To my mind, I did all that: "disconnect" and parameter settings (3 of them, name, pw and coding).
And not to forget: Set login prompt to false.
You told me so.

I will keep an eye on and if I suspect it may be a bug, I will try to make the "empfloyee.fdb" run and generate a project.

Navigation

[0] Message Index

[#] Next page

Go to full version