[Lazarus] getting values from a DBGrid

Diwakoe diwakoe at gmail.com
Mon Dec 14 03:15:25 CET 2009


On Mon, Dec 14, 2009 at 7:47 AM, Chris Jennings <cjvanbc at gmail.com> wrote:
> Thanks but
>
> DBMemo3.Lines.Add(datGrid.FieldByName('crs_courseName').AsString)
>
> returns
>
> u_courses.pas(124,30) Error: identifier idents no member "FieldByName"
>
> where "datGrid" is the name of my TDatasourse and "crs_courseName" is a
> column in my db
>

Do not use TDatasource use TDataset (TSQL Query SQLDB component or
TSQL Query Zeoslib component).

Ex:
DBMemo3.Lines.Add(SQLQuery.FieldByName('crs_courseName').AsString)


Cheers,
Diwa
-- 
Semua rasa ada disini
http://www.teoteblung.co.cc




More information about the Lazarus mailing list