You are not logged in.
Pages: 1
Hello everyone. Attentive to the advances of AIs and the recent launch of Llama3 by Meta, I found a website where it allows you to use this AI, and also generate "Assistants", which would be the equivalent of ChatGPT's GPTs. I created a help wizard for mORMot on this site, with a few instructions and some links to the synopse help pages and code, so that they can be integrated into the answers.
I hope it helps some of you. I pass the link: , in addition to the link to the HuggingChat page, which must surely be logged in before using the wizard.
HuggingChat: https://huggingface.co/chat/
Assistant: https://hf.co/chat/assistant/6628eca95d068b2d73e2e642
Surely someone can dedicate more time to it and improve it.
Greetings.
Hi ab,
Im running Mormot 2.0.4773 in a Windows 10 home 64 bits, Lazarus 2.2.0 and Freepascal 3.2.0.
my Notebook: HP Pavilion Notebook - 4xAMD A10-8700P Radeon R6
when run the test, there is a fail (not error) in procedure DMISmbios of test.core.base.bas in the line
...
CheckAgainst(Smbios, _smbios); // << ( aprox. line 5588 in sourcecode of test.core.base )
...
and invoque this internal procedure of the same prcedure DMISmbios in the marked line whit (**)
procedure CheckAgainst(const full: TSmbiosInfo; const os: TSmbiosBasicInfos);
begin
CheckEqual(full.Bios.VendorName, os[sbiBiosVendor]);
CheckEqual(full.Bios.Version, os[sbiBiosVersion]);
CheckEqual(full.Bios.Release, os[sbiBiosRelease]);
CheckEqual(full.Bios.Firmware, os[sbiBiosFirmware]);
CheckEqual(full.Bios.BuildDate, os[sbiBiosDate]);
CheckEqual(full.System.ProductName, os[sbiProductName]); // (** here is the fail )
CheckEqual(full.System.Version, os[sbiVersion]);
CheckEqual(full.System.Uuid, os[sbiUuid]);
if full.Processor <> nil then
CheckEqual(full.Processor[0].Manufacturer, os[sbiCpuManufacturer]);
if full.Battery <> nil then
CheckEqual(full.Battery[0].Manufacturer, os[sbiBatteryManufacturer]);
if full.Oem <> nil then
CheckEqual(full.Oem[0], os[sbiOem]);
end;
in my notebook, according to debug, the values are:
full.System.ProductName: 'HP Notebook Pavilion'
os[sbiProductName : 'HP Notevook Pavilion ' << with a final balnk.
which causes the check to fail, and we get a red message on the console.
Yes ab, thanks...
good morning Firebird and mormot users. I am about to start a new project (refactored from a Firebird 1.5 Database), and I would like to know, based on your experience, which version of firebird would be correct to use, depending on how ZEOS works. I know that Firebird 2.5, 3.0 and 4.0 already exist... but which one should I use?
Thanks ab! it was just what I needed.
I need to get the data returned by https://www.dolarsi.com/api/api.php?typ … rincipales in a rawUTF8 variable or variant. Thanks in advance!
thanks ab!, a blog entry would be very interesting and would give the project a big boost. Let me make some improvements and then we coordinate it.
Hi, I invite those interested to see the new project for Lazarus and Synopse mORMot framework in GitHub
https://github.com/camu72/CMProject
It is an attempt to facilitate the development of desktop applications, taking into account the use of Synopse libraries. It is still incomplete, but you can already compile it and see some examples of use with its tabulated interface. I will continue with the development, to implement it in running systems, so I await comments and suggestions. Thank you !!!
Thanks ab, that works...
Hi guys, I try to do something like that:
Create a TSynDictionary with images like values, do something with that, an then release de TSynDictionary instance, but before, release the images ( or objects instances in other cases ).
This is the pseudocode:
Type
TBitmapDynArray = array of TBitmap;
....
procedure myProcedure
var
ImagesDict: TSynDictionary;
begin
ImagesDict := TSynDictionary.Create(TypeInfo(TIntegerDynArray),TypeInfo(TBitmapDynArray));
{ Loads images from a zip in a rc file }
LoadImagen(34, 'ImgBuscar12.bmp');
LoadImagen(15, 'ImgAgregar12.bmp');
...
LoadImagen(12, 'ImgEditar12.bmp');
....
Do_a_lot_of_thing_WithImagesIn_ImagesDict;
....
{ magesDict.forEach(MyImagesInValues) do
EachImage.Free } << How do somethin like that?
// I mean, release the TObjects instances (Bitmaps in this case ) in the
// Values TDynArray of a TSynDictionary before free it?
ImagesDict.Free;
end;
I don't understand de use of ForEach in TSynDictionary... Can samone explainme or pointme samples?
Thanks in advance!
Very Cool!!! All test passed ... and like Esteban, I would also appreciate a reference to a tutorial ... Congratulations AOG!
waiting too!!!
Thanks ab... you really work fast!!!
Hi Kixemi, I modified the source of MormotService unit like in a first post, and runs OK, puting in Depenedencies parametrer, the name of Firebird Service in my case. The problems will came when Pull or Fetch the mORMot library... i will lose that changes.... but outside of that, works.
Hi ab, could be posible add a Dependences parameter to CheckParameters in mORMotService unit?
// In Definition change this
class procedure CheckParameters(const ExeFileName: TFileName;
const ServiceName,DisplayName,Description: string);
// for this
class procedure CheckParameters(const ExeFileName: TFileName;
const ServiceName,DisplayName,Description,Dependencies: string);
//and In the implementation add de dependences to :TServiceController.Install
...
if param='/install' then
TServiceController.Install(
ServiceName,DisplayName,Description,true,ExeFileName,Dependencies) else
...
If is not posible, how can define dependence of service using CheckParameters?
Ok Thanks ab.
Hi ab,
I know that TSQLRecord supports "set of enumerated types" in the declaration of its properties and is serialized as an integer. Is there a function in the library that can be used to convert SetOfEnumeratedTypes to integers and vice versa?
I tried to trace in the code, but I could not find where.
Thanks in advance.
Thanks ab, you work at the speed of light. Everything works ok.
Hi,
I have the follow situation
TSQLmyTable = class(TSQLRecord)
private
FField_1: integer;
FField_2: integer;
published
Field_1: integer read FField_1 write FField_1;
Field_2: integer read FField_2 write FField_2;
end;
...
{ in the model creation }
...
VirtualTableExternalRegister(Result, TSQLmyTable, pPropConexion, 'MY_TABLE');
Result.Props[TSQLmyTable].ExternalDB.
MapField('ID','ID_MYTABLE').
MapField('Field_1','FIELD_ONE').
MapField('Field_2','FIELD_TWO').
SetOptions([rpmNoCreateMissingTable, rpmNoCreateMissingField, rpmAutoMapKeywordFields]);
The TSQLmyTable point to an external DB (Firebird), and is maped to his real names.
The inserts, an updates are OK, but the Deletion in the follow way fails.
...
myRest.Delete(TSQLmyTable, 'FField_1 > 3')
...
or same SQLWhere where the count of IDs to delete was more than 1.
( when count of IDs is 1 run OK)
According to previous threads, I see that "myRest.Delete(aTable: TSQLRecordClass; SQLWhere: TRawUTF8)", first executes a select and obtains all the IDs that will be deleted according to the SQLWhere, to proceed with the "OnUpdateEvent" on the server.
As I can verify according to the trace, the "select" executes well and returns the list of IDs, but the "delete" fails and shows errors in the names of nonexistent fields, by the use of TSQLRecord names and not the real names of the database .
I do not understand why the select works well and the delete works poorly, both called with the same SQLWhere.
Any coments ar welcome... thanks
In a context of Interfaced Service in Server side i would like (seudocode):
function GetSomeData(someParam: Integer): RawJSON;
var
aJSON: rawUTF8;
aObj: TMySQLRecord; // not in the model but declared shared in Server and Client
begin
...
aJSON := '';
aObj := TMySQLRecord.Create;
try
for i := 0 to 100 do
begin
FillMyObject(aObj, i); // Empty and fill the published properties in a complex procedure
aJSON := AddObjectToJSON(aJSON, aObj); << How can do that?
{ how can add aObj streamed as JSON in a not empty aJSON ready for TSQLTableJSON use?? }
end
Finally
aObj.free;
end;
result := aJSON;
end;
The idea is have a service that retrive a rawUTF8, which in the client side can be managed whit TSQLTableJSON and TMySQLRecord.
Note: TMySQLRecord is not in the model, because is filled with a complex procedure and not have a Table in the ExternalDB asociated.
Best ideas are accepted.
Thanks.
Hi,
I have the follow code:
uses
...,
SynCommons,
....
procedure myProcedure(const FromNames, ToNames: TRawUTF8DynArray);
begin
DoSomething....;
end;
implementation
....
myProcedure(['Name1','Name2'],['ToName1', 'ToName2']); // here error on compiling
1) This is de correct way to invoke myProcedure???
2) If this is OK, then in Delphi7, Win7 32bits have de follow error on compilig:
[Error] TestProyect.dpr[xx]: Ordinal type required
What is wrong here?
Thanks.
Thanks mpv...
Ab, thx too for your quick aswer.... I Will Chek yours observations...
Hi...I just finish the actualization (with GIT) of mormot framework, and I'm not sure that this is a bug, but in previous versions, after a TSQLRecord instance is create, when the fields is TID type, SQLFieldType is tfsInteger, when in previous version of the framework was tfsTID.
Previous versions of framework:
SQLFieldRTTITypeName: 'TID' and SQLFieldType: sftTID
Actual version of framwokr:
SQLFieldRTTITypeName: 'TID' and SQLFieldType: sftTInteger
This is a bug?
I work with win7 32 bits - Delphi 7.
Another cuestion: how check in the source the version of mormot framwork?
Thanks....
Maybe the problem is the Firebird version... you with fb3 and I with fb1.5, and the ZeosLib is for FB2.5.... colud be a sintax problem waiting some intruction only available in FB2.5...
HI msgendodoc, i was a similar problem, and if i well remeber, when the table was at lest one record (filled with a external administrator ), the issue stop. This not resolve the problem, but is something that help to trace or resolve the problem.
Ok, Thanks ab...i Will Chek muy knowledge... But in SynFile.exe Is just compiled as it, and when open dB with SQLite administrator the Values Is wrong. Maybe the configuración of this editor Is wrong too. Will Chek this un my PC.
Considering this:
TmyRecord = class(TSQLRecord).
TmyRecord instance work with rawUTF8 in runtime.
RestClient.Update(myRecord) save encoding UTF8 in persistence layer (Firebird DB in my case).
but...
I need Firebird DB in Ansi encode ( is a legacy proyect and is shared for reporting with other tecnologies )
My problem:
in FirebirdDB have a field (myField) with the value "cañon"
when retrive myRecord from the FirebirdDB, have a string "cañon" and not "cañon" wich is the correct string in UTF8.
when update myRecord.someOtherField, myField in FirebirdDB is filled with the value "".
1) Actually this is the secuence:
Firebird : "cañon"
TSQLRecord: "cañon"
Firebird : ""
2)I need this secuence:
Firebird : "cañon"
TSQLRecord: "cañon"
Firebird : "cañon"
I mean, there is a way of load or retrive values from de persistence layer, performing a convertion from Ansi To UTF8 in the TSQLRecord.crete(...), and get the second secuence?
For try, you can play with de SynFile in MainDemo.
1) Execute SynFile.exe
2) Put in same field the value "cañon"
3) Close SynFile.
4) Open SynFile.db3 with an external editor like "SQLite Administrator", and you can comprob that the value is "cañon"
This is the correct way...
5) now, edit and change "cañon" for "cañon"
6) Open SynFile.exe and see the value... only have "ca"
Thanks in advance...
Claudio.
Hi Arnuad. I'm starting work in a complete migration of my obsolete erp and I like do it in a DDD direction. Do you have intentions of release the sample? I think that Will be like a very important start point for all the interest...
I was use your library for the last year and have a lot of enhance but still I don't make the big step.
Congratulation for this framework. It's very powerful.
Sorry for my inglish... I'm just a reader of this language.
Pages: 1