Saturday, October 09, 1999, 3:54:36 PM, you wrote:
> I have the following code in my project which is fine under D3 but with
> D5 I get a message saying
> "Incompatible types 'String' and 'TField' "
> Anyone got any ideas? Where else may the root of the problem be?
> procedure CreateTable (var TableName : TTable; FieldList : TStringList;
> FieldNo : Integer);
> var
> TempString : String;
> i : integer;
> begin
> with TableName do
> for i := 0 to FieldNo-1 do
> begin
> TempString := FieldList[i];
> FldName := Copy(TempString,
> 1, Pos(HEADINGFIELDSEPERATOR, TempString) - 1);
> etc
> TIA
> Mark
Scoping problem - FieldList is a property of TDataset, and because
you're inside the with TableName construct Delphi's going to look at
TableName.FieldList rather than your procedure parameter.
---------------------------------------------------------------------------
New Zealand Delphi Users group - Delphi List - [EMAIL PROTECTED]
Website: http://www.delphi.org.nz