dbMonitor shows string parameters incorrectly.

Discussion of open issues, suggestions and bugs regarding usage of dbExpress drivers for InterBase & Firebird in Delphi and C++Builder
Post Reply
Wade
Posts: 31
Joined: Sun 03 Jan 2010 06:04

dbMonitor shows string parameters incorrectly.

Post by Wade » Sun 11 Jul 2010 02:02

dbMonitor 3.0.2 with dbxida, FB2.5RC2, Delphi2009

On queries with string parameters, the parameters are reported incorrectly on the "Parameters" tab for dbMonitor.

Specifically, for a parameter of type "WideString", the first character is omitted and for a parameter of type "String", the first two characters are omitted.

Note that the parameter values are reaching the database correctly since the correct data is returned.

Possibly this is a clue:

function TIBCParamDesc.GetAsAnsiString: AnsiString;
var
ValPtr, Ptr: IntPtr;
Len: integer;
begin
case FDataType of
dtString:
ValPtr := IntPtr(Integer(FValue) + 2); // <<<<<<

If the "+2" is removed, the parameters are reported correctly in dbMonitor

Similarly, in "function TIBCParamDesc.GetAsWideString: WideString;"

Dimon
Devart Team
Posts: 2910
Joined: Mon 05 Mar 2007 16:32

Post by Dimon » Mon 19 Jul 2010 13:18

Thank you for information. We have reproduced this problem and fixed it. This fix will be included in the next DbxIda build.

Post Reply