Search found 25 matches

by Ostfriese
15.05.2009, 12:57
Forum: User Patches
Topic: [patch_done] Patch for TZAbstractConnection
Replies: 1
Views: 360

[patch_done] Patch for TZAbstractConnection

The Delphi compiler throws a warning that the result of PingServer could be undefined. I modified the procedure to

Code: Select all

function TZAbstractConnection.PingServer: Integer;
begin
  RaiseUnsupportedException;
  //050915 set Result to avoid compiler warning
  Result := -1;
end;
by Ostfriese
15.05.2009, 12:53
Forum: User Patches
Topic: [patch_done] Patch for TZGenericStatementAnalyser
Replies: 1
Views: 388

[patch_done] Patch for TZGenericStatementAnalyser

The Delphi compiler throws a compiler hint for FillTableRefs beause CurrentType is never used in one case. So I modified the procedure to remove this hint procedure TZGenericStatementAnalyser.FillTableRefs( SelectSchema: IZSelectSchema; FromTokens: TStrings); var TokenIndex: Integer; Catalog: string...
by Ostfriese
15.05.2009, 12:50
Forum: User Patches
Topic: [patch_done] Patch for ZDbcMetadata
Replies: 1
Views: 349

[patch_done] Patch for ZDbcMetadata

The function GetBestRowIdentifier has to variables (IndexName and ColumnNames) which are declared but never used. So I commented them out to stop bloating the compiler log function TZAbstractDatabaseMetadata.GetBestRowIdentifier(const Catalog: string; const Schema: string; const Table: string; Scope...
by Ostfriese
15.05.2009, 12:42
Forum: User Patches
Topic: [patch_done] Another Patch for ZConnection
Replies: 3
Views: 621

Thanks 8)
by Ostfriese
15.05.2009, 11:22
Forum: User Patches
Topic: [patch_done] Another Patch for ZConnection
Replies: 3
Views: 621

[patch_done] Another Patch for ZConnection

Currently the Delphi compiler throws a hint that the assigned return value for ExecuteDirect is never used. By modifying function TZConnection.ExecuteDirect(SQL:string; var RowsAffected:integer):boolean; var stmt : IZStatement; begin result := False; CheckConnected; stmt := DbcConnection.CreateState...
by Ostfriese
14.05.2009, 15:50
Forum: Firebird
Topic: How to get the message from a firebird db-exception?
Replies: 1
Views: 1940

How to get the message from a firebird db-exception?

If an exception from a firebird db is raised, Delphi raises an exception like SQL Error: exception 1 NOT_ALLOWED Zugriff verweigert At trigger 'CHECKUSER' line: 7, col: 32. Error Code: -836. exception. which is sometimes simply overloaded. Especialy if you only need the raw exception messag - in thi...
by Ostfriese
14.05.2009, 15:34
Forum: User Patches
Topic: :?: Patch for ZConnection.Connect
Replies: 13
Views: 3359

mdaems: Just take a look at my modified unit. The properties are still there but they use the connection properties username and password instead of extra variables. :wink: This is IMHO more consequent because there will be only one location where the username and password are stored or is there a r...
by Ostfriese
14.05.2009, 14:25
Forum: User Patches
Topic: :?: Patch for ZConnection.Connect
Replies: 13
Views: 3359

Okay, I've reworked my patch in that way that I've additionaly removed the protected FUser and FPassword variables. The User and Password properties are now setting and getting the coresponding connection properties. After login dialog is closed the private procedure which set the username and passw...
by Ostfriese
14.05.2009, 09:59
Forum: User Patches
Topic: :?: Patch for ZConnection.Connect
Replies: 13
Views: 3359

From my point of view I expect that the properties user and password allways contain the current values which are either set by the program or modified by the login prompt. Otherwise they are useless because it's impossible to determine which username is currently used.
by Ostfriese
12.05.2009, 10:58
Forum: User Patches
Topic: :?: Patch for ZConnection.Connect
Replies: 13
Views: 3359

:?: Patch for ZConnection.Connect

Currently the username and password properties are not updated if they were changed in the login dialog. So I've modified procedure TZConnection.Connect; var //Local variables declared in order to preserve the original property value //and to avoid the storage of password Username, Password: string;...