You are not logged in.
Pages: 1
TCar = class(TSynAutoCreateFields)
private
FCOD_CAR : RawUTF8;
FDESCRICAO : RawUTF8;
published
property COD_PRO :RawUTF8 read FCOD_PRO write FCOD_PRO;
property DESCRICAO :RawUTF8 read FDESCRICAO write FDESCRICAO;
end;
TACar = array of TCar;
Function TServer.Teste(const pEmpresa: string; var aCar: TACar):RawJson;
Begin
result := pEmpresa;
end;
I built a complete server in mormot2 with JWT authentication using ChatGPT-4. We interacted, exchanging information until we found a solution. ChatGPT did 80% of the work.
Yes, but when I undefine NOSYNDBZEOS in the package, it doesn't work.
Any solution? I have the same error, using PerfTestCases. I was only able to use it by adding mormot.db.sql.zeos to my project.
I managed to implement JWT authentication with GetToken and RefreshToken, using Mormot2.
I'm having the same error
Hi AB,
I did not find examples of using the audit trail, nor in the forum.
The example I made was based on item 5.9.2 of the documentation.
Sorry for my ignorance, but how do I check with the regression test?
I tried to use the audit trail but it did not work.
Does not return anything, although there are records in the history table
See my code
aOrcamento := TOrmerc_Orcamento.Create;
aHist := TSQLRecordHistory.CreateHistory(aClient,TOrMerc_Orcamento,1);
aHist.HistoryGet(i,aEvent,aTimeStamp,aOrcamento);
try
memo1.Lines.Add('Number of items in the record history: '+inttostr(aHist.HistoryCount));
for i := 0 to aHist.HistoryCount-1 do begin
memo1.Lines.Add('Event: '+GetEnumName(TypeInfo(TSQLHistoryEvent),ord(aEvent))^);
memo1.Lines.Add('TimeStamp: '+TTimeLogBits(aTimeStamp).i18nText );
memo1.Lines.Add('Value: '+aOrcamento.GetJSONValues(true,true,soSelect));
end;
finally
aHist.Free;
aOrcamento.Free;
end;
I use XE5, but also tested in XE4 and XE2.
If you open the example Project04Server and add mormoti18n in uses, will give the error.
Yes, the problem happens when I use mormoti18n a server type, as in Project04Server program.
To resolve I needed to put vcl.menus.
Hi,
I'm trying to compile the dxe5 and I can not.
"mORMoti18n Menus.dcu File not found"
I use DXE5.
Thanks
Hi,
This routine does not work with delphi xe5 + Android. I had to change.
begin
if C=nil then
result := '' else begin
result := C.ClassName;
if IdemPropName(copy(result,1,4),'TSQL') then
if IdemPropName(copy(result,5,6),'Record') then
delete(result,1,10) else
delete(result,1,4) else
if result[1]<>'T' then
delete(result,1,1);
end;
end;
---------------------- NEW ------------------
function GetDisplayNameFromClass(C: TClass): string;
begin
if C=nil then
result := '' else begin
result := C.ClassName;
if IdemPropName(copy(result,1,4),'TSQL') then
if IdemPropName(copy(result,5,6),'Record') then
delete(result,1,10) else
delete(result,1,4) else
if result[1]='T' then
delete(result,1,1);
end;
end;
I had the same problem in XE4
But the problem was even 3.8.5. Obj files
Thanks
Hi,
When I execute the project 02 gives error.
The error also happens in another projects in the Routine Create Missing Tables.
I use sqlite.
Thanks
HI
I'm trying to create a model using ORM oracle, but all the examples I have seen are in SQLITE.
Procedure TServiceRemoteSQL.Cadastro (const aOp: integer; var fTableJSON: RawUTF8);
var
Rec: TItens;
Rows: ISQLDBRows;
jItensFIS : TSQLTableJSON;
vselect: string;
Database: TSQLRestServer;
l:integer;
Begin
Database := TSQLRestServer.Create(aModel, true);
Rec := TItens.Create;
jItensFis:= TSQLTableJSON.Create([],s2U(vselect),fTableJSON);
while jItensFis.Step do
begin
l:=1;
Rec.empresa:= strtoInt(u2s(jItensFis.Get(l,0)));
Rec.filial:= strtoInt(u2s(jItensFis.Get(l,1)));
if Database.Add(Rec,true)<>0 then
writeln(#10'Erro Inserindo.'#10);
end;
end;
I found this error and do not know where to report!
procedure TSQLRecordProperties.RegisterCustomRTTIRecordProperty(aTable: TClass;
aRecordInfo: PTypeInfo; const aName: RawUTF8; aPropertyPointer: pointer;
aAttributes: TSQLPropInfoAttributes=[]; aFieldWidth: integer=0;
aData2Text: TOnSQLPropInfoRecord2Text=nil;
aText2Data: TOnSQLPropInfoRecord2Data=nil);
begin
Fields.Add(aTable,TSQLPropInfoRecordRTTI.Create(aRecordInfo,aName,Fields.Count,
aPropertyPointer,aAttributes,aFieldWidth,aData2Text,aText2Data),); <-----
end;
Yes, I know, but I refer to the program perMain, he has the two uses and makes two calls, however, I don't know when his use one or the other, would have to analyze the logic of it.
I'm trying to create a server that connects to oracle and publish classes by http
Well, I think I'm not using ODBC, now I'm confused, I have the client installed and when I run the program, i use the parameters of the client.
You're right, but do not know how to configure the program to not use ODBC.
Oracle 11g XE has changed the way it treats the NLS_LANG, I had several problems with Delphi applications (Note that I only use Delphi applications).
My language is BRAZILIAN PORTUGUESE_BRAZIL.WE8MSWIN1252
Then I tried with BRAZILIAN PORTUGUESE_BRAZIL.AL32UTF8 (This is the language of my oracle server) and repeated the error invalid number
And finally with american_america.AL32UTF8 and the result was
First chance exception at $ 7645C41F. Exception class EODBCException with message
'[IM002] [Microsoft] [ODBC Driver Manager] Data source name not found and no default driver specified (0)'.
PerfTest.exe Process (5824)
You thought of some other language?
When I run "15 - External DB performance" I got the following msg:
"First chance exception at $7645C41F. Exception class ESQLDBOracle with message 'ORA-01722: número inválido'. Process PerfTest.exe (5028)"
When I run "16 - Execute SQL via services", I used a "SELECT * FROM TABLE", and TABLE contained a numeric field with a comma, the grid shifted one column.
thanks
I read all the "Framework Synopse mORMot SAD 1.18", compiled and tested all examples, however, do not have exactly what I want.
Actually, you're right, after reading all that I read, I am able to build what I want, but I wanted something done, like copy and paste ... hehehe
The examples are not in Oracle, so it's a little different.
I'm out of time ...
I'll use a server Oracle database with http protocol and a thin client written in delphi.
I appreciate your prompt service, I am now beginning to develop with this framework, soon I hope to contribute to the community.
hugs
I have a system written in Delphi with Oracle and need to add new functionality, web access, access via smartphone, so I decided to re-write a new approach, using ORM and SOA.
There are no examples of CRUD on an entity table with oracle.
I managed to connect to the server, passing objects, but to make a CRUD a table yet.
Does anyone have a simple example to add, change and delete a registry basics, using mORMot?
thank you
Sorry,
my english is very poor, so I summarize.
Follow the error:
People := TSQLPeople.Create;
try
People.Name := 'Smith';
People.Address := 'New York City';
People.BirthDate := Now;
ID := Client.Add(People);
finally
People.Free;
Checking project dependencies...
Compiling PrjCad.dproj (Debug, Win32)
[DCC Error] Ucad.pas(157): E2003 Undeclared identifier: 'Client'
[DCC Error] Ucad.pas(68): E2065 Unsatisfied forward or external declaration: 'TMainForm.Execute'
[DCC Fatal Error] PrjCad.dpr(5): F2063 Could not compile used unit 'Ucad.pas'
Failed
Elapsed time: 00:00:00.2
Yes, i'am using latest 1.18 unstable version of the framework
/// Virtual Tables for external DB access for mORMot
// - this unit is a part of the freeware Synopse mORMot framework,
// licensed under a MPL/GPL/LGPL tri-license; version 1.18
Thanks
Hi,
Where is this client in line?
ID: = Client.Add (People);
In delphi XE2 gives error!
thanks
Pages: 1