Reputation: 1617
I am using Delphi 2010 dbexpress
components to connect to my MySQL
database.
I am facing a problem executing this query.
SQLQuery1.SQL.Clear;
SQLQuery1.SQL.Add('Select ForNo,Description from fortab');
SQLQuery1.Open;
It gives me an error saying
DBX Error :Unsupported field type.
now if I have the only 1 field in the query it will work fine i.e.
Select Description from fortab;
or
Select ForNo from fortab;
fortab structure
ForNo: int(10) unsigned NOT NULL, Primary key
Description: varchar(45) NOT NULL,
ENGINE=InnoDB DEFAULT CHARSET=latin1;
Can anyone specify me the proper format of retrieving multiple fields from the table?
Or is it that I will have to write individual queries for each field?
Upvotes: 3
Views: 1286
Reputation: 76577
Can anyone specify me the proper format of retrieving multiple fields from the table?
SELECT field1, field2, field3 FROM atable
WHERE field1 > 100
ORDER BY field1
Upvotes: 1