ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/public/ibx/trunk/runtime/nongui/IBSQL.pas
(Generate patch)

Comparing ibx/trunk/runtime/nongui/IBSQL.pas (file contents):
Revision 228 by tony, Wed Mar 14 12:48:51 2018 UTC vs.
Revision 229 by tony, Tue Apr 10 13:32:36 2018 UTC

# Line 206 | Line 206 | type
206      procedure CheckValidStatement;   { raise error if statement is invalid.}
207      procedure Close;
208      procedure ExecQuery;
209 <    function HasField(FieldName: String): boolean;
209 >    function HasField(FieldName: String): boolean; {Note: case sensitive match}
210      function FieldByName(FieldName: String): ISQLData;
211      function ParamByName(ParamName: String): ISQLParam;
212      procedure FreeHandle;
# Line 741 | Line 741 | begin
741   end;
742  
743   function TIBSQL.HasField(FieldName: String): boolean;
744 + var i: integer;
745   begin
746 <  if FResults = nil then
746 >  if MetaData = nil then
747      IBError(ibxeNoFieldAccess,[nil]);
748  
749 <  Result := FResults.ByName(FieldName) <> nil;
749 >  Result := false;
750 >  for i := 0 to MetaData.Count - 1 do
751 >  begin
752 >    if MetaData.ColMetaData[i].Name = FieldName then
753 >    begin
754 >      Result := true;
755 >      Exit;
756 >    end;
757 >  end;
758   end;
759  
760   function TIBSQL.GetEOF: Boolean;

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines