Home > Back-end >  FireDac query modification of the problem
FireDac query modification of the problem

Time:09-25

Environment: Win8.1 + XE8 up1 + is essentially
A project with UniDAC before, now change to FIreDac, encounter a problem,
When using FDQuery, such as
Qry1. SQL. Append (' select KeyId as identifier, the userName as the user name from tablename ');
Qry1. Open;
In the corresponding Grid edit or use statement
Qry1. FieldByName (' id '). AsInteger:=100;
Modification, in the preservation of SQL Server will throw an invalid column 'identity' exception, use used to monitor trace statements, found FireDac update when using a similar update table set id=100 where id=1 such statement updated,
Is this what is the solution?

CodePudding user response:

Recommend
 FDQuery1. SQL. Text:='select KeyId, userName from tablename'; 
FDQuery1. FieldByName (' KeyId). DisplayLabel:='identity;//DisplayName; DisplayText
FDQuery1. FieldByName (" userName "). DisplayLabel:='user name';

CodePudding user response:

Xe8 up1 out? Give a link

CodePudding user response:

I also met this problem, such as master

CodePudding user response:

Database is not the field "identity", must make a mistake, not AS such try first, may be a bug
  • Related