Using : D2007, Firebird 2.1, Zeos 6.6.3
I have two stored procs in my Firebird 2.1 database :
PATIENT_SEL &
PATIENT_SEL_LST
When I add the TZStoredProc to my datamodule, set the connection to a TZConnection, and set the StoredProcName to PATIENT_SEL, then after I click on the Params... property (in object inspector), I see parameters from the _second_ stored procedure in the parameter list in addition to the parameters from this procedure.
I think this is a bug in the component, that it is retrieving parameters from a stored procedure that has a name which is similar ?
I will be glad to provide more info.
Cheers and keep up the good work!
- Notra Damus
Possible bug in TZStoredProc designtime component - Params
Moderators: gto, EgonHugeist
-
- Junior Boarder
- Posts: 27
- Joined: 22.05.2008, 23:54
- mdaems
- Zeos Project Manager
- Posts: 2766
- Joined: 20.09.2005, 15:28
- Location: Brussels, Belgium
- Contact:
Hey,
Can you please log bugs to the bug tracker next time
Problem : the underscore character is handled as a wildcard. In this case that should not happen.
I think this problem may be solved by this patch:
I know, it's against Testing Branch, but essentially it's adding the AddEscapeCharToWildcards function to the IZDatabaseMetadata interface and call that function when passing the procedure name as a pattern.
Can you please test this and report here?
Can you please log bugs to the bug tracker next time
Problem : the underscore character is handled as a wildcard. In this case that should not happen.
I think this problem may be solved by this patch:
Code: Select all
Index: component/ZStoredProcedure.pas
===================================================================
--- component/ZStoredProcedure.pas (revision 480)
+++ component/ZStoredProcedure.pas (working copy)
@@ -316,6 +316,7 @@
Connection.ShowSQLHourGlass;
try
SplitQualifiedObjectName(Value, Catalog, Schema, ObjectName);
+ ObjectName := Connection.DbcConnection.GetMetadata.AddEscapeCharToWildcards(ObjectName);
ResultSet := Connection.DbcConnection.GetMetadata.GetProcedureColumns(Catalog, Schema, ObjectName, '');
OldParams := TParams.Create;
try
Index: dbc/ZDbcIntfs.pas
===================================================================
--- dbc/ZDbcIntfs.pas (revision 480)
+++ dbc/ZDbcIntfs.pas (working copy)
@@ -324,6 +324,8 @@
procedure ClearCache;overload;
procedure ClearCache(const Key: string);overload;
+
+ function AddEscapeCharToWildcards(const Pattern:string): string;
end;
{**
Can you please test this and report here?
-
- Junior Boarder
- Posts: 27
- Joined: 22.05.2008, 23:54