LoginPrompt set to true is not honored at runtime

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for Oracle in Delphi and C++Builder
Post Reply
costa
Posts: 30
Joined: Thu 27 Aug 2009 20:30

LoginPrompt set to true is not honored at runtime

Post by costa » Tue 21 Jan 2014 23:56

Hello:

I am using Delphi XE5 and the latest version of the driver from the October 2013 release (the setup exe file dbxoda63 has the version 6.3.4). I am using the Oracle 11.2.0 client oci (the exact version of oci.dll is 11.2.0.1).

I created this simple form (target platform win32) and I added a TSQLConnection component with the following properties:

Code: Select all

object scnDb: TSQLConnection
    DriverName = 'DevartOracle'
    Params.Strings = (
      'BlobSize=-1'
      'DataBase=rddev'
      'DriverName=DevartOracle'
      'ErrorResourceFile='
      'LocaleCode=0000'
      'Password='
      'Oracle TransIsolation=ReadCommitted'
      'RoleName=Normal'
      'User_Name=yoyo'
      'LongStrings=True'
      'EnableBCD=True'
      'InternalName='
      'FetchAll=False'
      'CharLength=0'
      'Charset='
      'UseQuoteChar=False'
      'UseUnicode=True')
    Connected = True
    Left = 424
    Top = 280
  end

When I run the project I get:
Exception TDBXError in module TestDataBinding.exe at 002757F6
ORA-01005: null password given; logon denied

It doesn't prompt me for password.

When I opened the project at design time I was prompted for password.

Any idea about what's happening? Why am I not prompted for password at runtime?

Thank you

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: LoginPrompt set to true is not honored at runtime

Post by AlexP » Wed 22 Jan 2014 09:14

Hello,

If you haven't specified a login, then the driver will use OS authentication - and you will get a corresponding notification if OS authentication is not enabled on the server and a corresponding user is not created. For the time being, login setting is necessary. We will consider the possibility to change this behavior in future.

costa
Posts: 30
Joined: Thu 27 Aug 2009 20:30

Re: LoginPrompt set to true is not honored at runtime

Post by costa » Wed 22 Jan 2014 18:54

A colleague of mine found that if you add the DBLogDlg unit to your uses clauses you get prompted for password (assuming the onlogin event is not handled). It is specified in the help: http://docwiki.embarcadero.com/Librarie ... oginPrompt. I tried it and it works.

It is weird though.

Thank you

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: LoginPrompt set to true is not honored at runtime

Post by AlexP » Thu 23 Jan 2014 09:49

Yes, if you add this unit, the Login dialog will be displayed when establishing a connection. However, due to "poverty" of the dbExpress Login dialog, it is better to create your own dialog and display it in the onLogin event.

Post Reply