Options.LongStrings not working in 2.7
Posted: Fri 29 May 2009 20:19
I've recently updated to UniDAC 2.7 for Delphi 7 (using postgres 8.3). It seems to have caused an issue with code that was working with 2.5. We have the following situation:
In 2.5, myQuery.FieldByName('somefield') is of type ftString. Now in 2.7, myQuery.FieldByName('somefield') is recognized as type ftMemo. In 2.5, the assignment works fine, but in 2.7, the assignment gives an error stating "Invalid class typecast".
What do I need to do to get this code working again?
Thanks
Code: Select all
myVar: TStringField
myQuery: TUniQuery
myQuery := TUniQuery.Create(nil);
myQuery.Options.LongStrings := true;
...
myVar := myQuery.FieldByName('somefield') as TStringField;
...
What do I need to do to get this code working again?
Thanks