Page 1 of 1

Edit a Query >>>> NO Function at DelphiXE

Posted: 12.10.2010, 07:39
by Red-Flash
This Function didn't works at Delphi XE


with Query do
begin
SQL.Clear,
SQL.add ('SELECT * FROM Tablename')
Open;
if RecordCount > 0 then
begin
Edit;
FieldByBName ('Field').asString := 'Hallo'; // ------> here comes an error-message
Post;
end;

Posted: 12.10.2010, 10:34
by Marius2
Editing a query result is useless.

Instead write an update sql.. update table set field=:value etc..

Posted: 12.10.2010, 10:47
by Red-Flash
I know the UPDATE function,

BUT ist is very easy to edit a query, as an UPDATE...

and it works everytime with Delphi7.

but DelphiXE ????????

Posted: 12.10.2010, 10:51
by Marius2
Yes its easy, but it wil not work AFAIK.

Posted: 12.10.2010, 11:25
by Red-Flash
Marius2 wrote:Yes its easy, but it wil not work AFAIK.
Why, didn't ist Work with XE ????