[lazarus] ANSISTRING expected TSTRINGS (trouble)

Michal Bukovjan bukovjan at mbox.dkm.cz
Sun Aug 25 18:17:55 EDT 2002


marius popa wrote:

>i want to run next code (create a Tstrings and then transmit it to a query )
>  tmpquery := TFIBQuery.Create(Self);
>  mysql:=Tstrings.Create();
>  mysql:='Select * from employee';     (*this is the line 152*)
>  tmpquery.SetSQL(mysql);
>
>and this error kill me !!
>
First, you should use TStringList, not TStrings, which is abstract, right?

Second, I think the assignment should be

mysql.Text:= 'Select * from employee';

Otherwise you are assigning a string to an object.

Michal







More information about the Lazarus mailing list