You are not logged in.
Pages: 1
Hello there, i am having a problem in performing the Update command to update the ID of a TSQLRecord field in specific,
this is part of the code
//////////////////////////////////////////////////////////////////////////////////////////////////
Ambiente := TSQLAmbiente.CreateJoined(FmORMot, ID);
try
Ambiente.Database := DataBase;
Ambiente.DatabaseLOG := DatabaseLog;
Ambiente.User := UserName;
Ambiente.Password := Password;
Ambiente.ServerCharSet := ''
Ambiente.Sldialect := 3;
Ambiente.HostName := Host;
Ambiente.TipoBancoDados := '';
Ambiente.WaitOnLocks := False;
Ambiente.Port := Port;
Ambiente.PortHttp := PortHTTP;
Ambiente.PortmORMot := PortmORMot;
Ambiente.Version.IDValue := IDVersion;
FmORMot.Update(Ambiente);
except
raise Exception.Create('Não foi possivel Editar!');
end;
////////////////////////////////////////////////////////////////
The Update command changes the other fields, but this Version field is a TSQLRECORD, it receives the correct value of the ID, but in Update and Commit, the value saved in the database is a gigantic that does not match the value received.
i Already read all the documentation about Update command and can't found the answer. How i change the TSQLRecord field?
Offline
It is not supported in nested fields IIRC.
You have to update the field itself.
TryFmORMot.Update(Ambiente.Version);
We already try this, but in the end, When he updates, in the database he comes empty. We Try every single Command in the Documentation about Update, but don't work.
we already found one solution but, it's change the TSQLRecord field to a Integer and Relate the tables in the in the Create, but i don't think this is the best solution.
Offline
Pages: 1