Recent

Author Topic: SqlDb Lazarus 1.0.14 Firebird  (Read 3130 times)

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
SqlDb Lazarus 1.0.14 Firebird
« on: February 06, 2014, 11:50:12 am »
Probably bug, I do not know if someone mentioned earlier the same mistake.  When I set LoginPrompt(IBConnection) to true  there is no dialog, I've got an error (user name and password).
Windows 7 ultimate 32bit, Lazarus 1.0.14 32bit, Firebird 2.5.
Regards

Zoran

  • Hero Member
  • *****
  • Posts: 1575
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: SqlDb Lazarus 1.0.14 Firebird
« Reply #1 on: February 06, 2014, 02:50:32 pm »
This is what the documentation says (see here):

Quote
LoginPrompt can be set to True to force the system to get a username/password pair from the user. How these data are fetched from the used depends on the OnLogin event handler.

Not quite clear. From this, I am not sure if the connection component should provide some default login dialog, or it is up to programmer (ie. you) to provide one.
From this, I'd say that this property does nothing else but determines if OnLogin event fires or not. However, this does not seem useful, because you could always easily set OnLogin event to nil if you do not want it to fire.

Maybe you should report this as a bug — if nothing else, at least the documentation should be more clear.

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Re: SqlDb Lazarus 1.0.14 Firebird
« Reply #2 on: February 06, 2014, 10:34:53 pm »
Thank you very much, Zorane!
Best regards

p.s. For now, I will not write a bug report. We'll see solutions in the new version 1.2. It's not a big problem.
« Last Edit: February 06, 2014, 10:42:41 pm by exdatis »

Zoran

  • Hero Member
  • *****
  • Posts: 1575
    • http://wiki.lazarus.freepascal.org/User:Zoran
Re: SqlDb Lazarus 1.0.14 Firebird
« Reply #3 on: February 07, 2014, 11:04:06 am »

p.s. For now, I will not write a bug report. We'll see solutions in the new version 1.2. It's not a big problem.

It is quite same with 1.2 fixes branch, as well as with 1.3 (trunk) version. Probably it is the right behaviour, but the documentation is not quite clear.

ZeosConnection behaves similarly, but throws exception with the message "Can not find default login prompt dialog. Please add DBLogDlg to the uses section of your main file.". Despite this message, ZeosLib does not seem to contain a unit named DBLogDlg...  %)

exdatis

  • Hero Member
  • *****
  • Posts: 668
    • exdatis
Re: SqlDb Lazarus 1.0.14 Firebird
« Reply #4 on: February 08, 2014, 10:23:19 am »
Thanks again, Zorane.
This is easy to solve, I use my own dialog, before attempting to establish connection.
Regards!

 

TinyPortal © 2005-2018