You are not logged in.
Pages: 1
I have open a ticket: http://synopse.info/fossil/tktview?name=9de8be5d9e
For us to see this problem more deeply.
Having more time to debug, the type of fields that has this issue are: TEnumeration, TTimeLog and sometimes boolean.
Ok, what can we do to solve this problem?
I was debuging and seens like the problem is in this line:
else result.Fields[F].AsVariant := aTable.GetVariant(i,F,aClient);
when the framework is populating the clientdataset.
What do you guys think?
Do you think this problem is happening because of the method TSQLTableToDataSet or the declaration of the class?
I'm using Delphi XE2 UP4.
The latest unstable 1.18 version that I'm using is this one: http://synopse.info/fossil/info/9e89095221
The class is:
TTipoPessoa = (tpJuridica, tpFisica);
TCliente = class(TSQLVO)
private
FDivida: Currency;
FDataAlteracao: TModTime;
FIdade: Integer;
FNome: RawUTF8;
FDataNascimento: TDateTime;
FCNPJ: RawUTF8;
FEndereco: TEndereco;
FEnderecoLogradouro: RawUTF8;
Fchk1: Boolean;
FTipoPessoa: TTipoPessoa;
FData: TDateTime;
published
property Nome: RawUTF8 read FNome write FNome;
property Idade: Integer read FIdade write FIdade;
property DataAlteracao: TModTime read FDataAlteracao write FDataAlteracao;
property Divida: Currency read FDivida write FDivida;
property DataNascimento: TDateTime read FDataNascimento
write FDataNascimento;
property CNPJ: RawUTF8 read FCNPJ write FCNPJ;
property Endereco: TEndereco read FEndereco write FEndereco;
property EnderecoLogradouro: RawUTF8 read FEnderecoLogradouro
write FEnderecoLogradouro;
property chk1 : Boolean read Fchk1 write Fchk1;
property TipoPessoa : TTipoPessoa read FTipoPessoa write FTipoPessoa;
end;
It is happening with all kind of fields.
Seens like the new sources is wrong, because I can't compile SynCommons, I'm using delphi xe2.
The error is: "error E2442: E2441 Inline function declared in interface section must not use local symbol 'GetHighUTF8UCS4'"
This is the last version in the TimeLine
Hello,
When I try to use the method TSQLTableToDataSet I get the error: "Could not convert variant of type (UnicodeString) into type (Date)".
I'm using the ORM with SQlite.
I have a property BirthDate of type TTimeLog, I suspect that the error is with this TTimeLog type of Field. Because I have fields TModTime and TCreateTime but the error started after I add the BirthDate : TTimeLog.
Is this a error of the framework? How can I handle It properly?
Hello,
How can I handle fields of tipe only Date or only Time? I know there's TTimeLog / TModTime / TCreateTime. But can I use TDate and TTime?
Hi. How can I convert TModTime / TCreateTime into TDatetime to show it to the user?
Ok, thanks.
I'm having some troubles with this approach. Error : "Class TBankVO" not found".
TBankVO = class(TSQLRecord)
private
FCODIGO: String;
FNOME: String;
published
[TFormatter(100, taCenter, True, True)] // this is a custom attribute
property Codigo: String read FCODIGO write FCODIGO;
property Nome: String read FNOME write FNOME;
I have a procedure in a interface:
IBancoController = interface(IInvokable)
['{078EF22D-E687-44AE-8E9F-47C841095108}']
procedure Get(var Result: TObjectList);
end;
When I'm calling from the client a found this error every time.
Hi,
Wich TObjectList can I use with Interface Based Services, from the unit WebAdapt or System.Generics.Collections???
Great!!!
There is a code:
26063 oObjectList: begin // TList leaks memory, but TObjectList uses "ClassName":.
Does It means that TObjectList don't leaks memory?
I'm sorry if I have been annoying, is that I'm accustomed to the Datasnap, and all this is different to me.
I'm suppose to create a model off an TSQLAuthUser and TSQLAuthGroup?
Hello,
In the sample 14 theres a code to set user and password:
Client.SetUser('User','synopse');
How can we change the name of the user and the password of the server?
There is a Garbage Collector on the framework?
Ok, thank you.
I see you use a class TInterfacedCollection.
I'm beginning with delphi, I read a lot o posts in this forum and in the documentation, but I still don't know how to use it in this situation.
Could give me a example?
Thanks!!
Very well, how can a send a bunch o TCostumers like 30 at once?
Can I send a TList of TCostumers?
OK, could you give a example of how I should do It?
Thanks!!
Thank you for answering.
This is a class I'm using:
TCostumer = class(TPersistent)
private
FName: string;
published
property Name : string read FName write FName;
end;
This is the interface:
ICostumer = interface(IInvokable)
['{770D009F-15F4-4307-B2AD-BBAE42FE70C0}']
function GetCostumer : TCostumer;
end;
When a try to run the server a get the error: 'ICostumer .GetCostumer: unexpected result type TCostumer'
I didn't found any example sending objects.
Hi, I'm new with your amazing framework.
How do I send Object from the server to the client in a Interface Based Services?
Perfect, thank you.
How do I use de function JSONToObject?
JSONToObject(d, Putf8char(mmo1.Lines.Text), b);
d is a TCostumer, mmo1.Lines.Text has the JSON from the result of the earlier procedure, and b is a boolean.
However the code:
mmo1.Lines.Add(d.Name);
Results in a empty string ''.
Hi, sorry about my English, I'm from Brazil.
I'm trying to turn a Object into JSON format putting the result into a TMemo. Its a simple class:
TCostumer = class(TPersistent)
private
FName: RawUTF8;
public
property Name: RawUTF8 read FName write FName;
end;
The code I'm using is:
procedure TForm1.Button1Click(Sender: TObject);
var
c : TCostumer ;
begin
c := TCostumer .Create;
c.Name:= 'Tom';
Memo1.Lines.Add(ObjectToJSON(c));
end;
The problem is that the result is "{}". What am I doing wrong?
Pages: 1