You are not logged in.
Ok, I'll check at home. Sorry, but I'm doctor and I have a lot of professional work. Thanks for all.
Look at the Caption bar. This is the result of showing the content of the field that is really empty, but it shows me the union of the previous field next to the next one. Look at the Grid: I am showing the field "Equipo" and it shows me the union of the "CI" field next to the following "DatosClin".

Hello?
How can I send you a screenshot from my PC?
Screenshot?
I don't understand you. I use the same code of example # 17. It use this datasource (ds1: TDataSource;)
The code is the same of example # 17, the only change is the database that I open. I still working with example # 17 until I hace all that I need and then migrate all my original code to mORMot. I'll try to extract some piece of databse and try to reproduce this error. I use Delphi Berlin.
I am trying to recode my app, migrating the SQLite usage code from ZeosLib to mORMot. All right, until I realize that sometimes, when there are empty fields, the SQL SELECT returns the value of that empty field, with the value of the following fields, example:
Suppose:
Field1 = 'Value 1'
Field2 = ''
Field3 = 34
Field4 = 'Blue'
SELECT Field1, Field2, Field3, Field4 FROM Table 1
Field1 = 'Value 1'
Field2 = '34Blue'
Field3 = 34
Field4 = 'Blue'
Sometimes, when the number of records returned by the SELECT is greater than one, the empty fields remain correctly empty.
Any answer? Please....
With ZeosLib I hve this:
Table Persons -> Name TEXT field (only this)
SQL:= SELECT 'Blue' Color, Name FROM Persons;
Return
Color Name
Blue Wilson
Blue Patric
etc
Ok, I create a new Field by SQL in the fly, but with mORMot this return:
Color Name
??Blue?(+ symols: arrows, squares etc) Wilson
Blue(+ symols) Patric
Why?
I don't use Zeos connection. I use code TSQLDBSQLite3ConnectionProperties (example 17 - TClientDataSet use)
I only change database name with my DB name, uncrypted.
My database is UTF8. When I load with example # 17, it shows in DataSet incomplete text. NO warning in compilation.
I have ZeosLib 7.2 version. Any recent version?
Recreate the database?
Hello:
Well, now I can use mORMot even with FastReport, but I've another trouble that I can't solve yet. My old database was encoded with UTF8 and I have been using Delphi 2006. Now I want to upgrade all code to Delphi 10.1 Berlin, and when I query some data, mORMot it responds with incomplete text. Trying it the DB with ZeosLib as before in Delphi 2006, I can see that the problems is that controls (TDataSet, TDBMemo, etc) in Delphi 10.1 load data in UTF16, when mORMot work with UTF8, right?
How can I fix this?
Thanks
Well, I try now the same code but in Delphi 10 Berlin and it work perfectly... I use Delphi 2006. I will try to migrate all my code to Delphi Berlin (unicode)
So, the problem is (almost) in Delphi 2006
Yes I download the latest. I always download mORMotNightlyBuild.zip and sqlite3obj.7z. I's that ok?
Even using it. Example 17 show error. First siad json error trying load onCreate code. Raise error and never enter in test.db3 loading.
Changing this part, it load, but show ole error too.
Could I send you by email a rar file with database + code?
This is the code with 3 variants (read every head comment)
procedure TForm1.Button1Click(Sender: TObject);
const
SQL_PEOPLE = 'SELECT Nombre, HC, CI FROM Pacientes LIMIT 100';
var
proxy: TSQLDBConnectionProperties;
stmt: TSQLDBStatement;
begin
FreeAndNil(sqlite3); // release any previous instance (e.g. static)
sqlite3:= TSQLite3LibraryDynamic.Create('sqlite3.dll');
fDBFileName:= 'Pacientes.db3';
fProps := TSQLDBSQLite3ConnectionProperties.Create(StringToUTF8(fDBFileName),'','','');
ds1.DataSet.Free;
// Variant 1 - returns differents values, all symbols...
ds1.DataSet:= TSynDBDataSet.Create(self);
TSynDBDataSet(ds1.DataSet).Connection := fProps;
TSynDBDataSet(ds1.DataSet).CommandText := SQL_PEOPLE;
TSynDBDataSet(ds1.DataSet).IgnoreColumnDataSize := true;
ds1.DataSet.Open;
// Variant 2 - This return oleaut32.dll error
ds1.DataSet := TSynDBSQLDataSet.Create(self);
TSynDBSQLDataSet(ds1.DataSet).Connection := fProps;
TSynDBSQLDataSet(ds1.DataSet).CommandText := SQL_PEOPLE;
ds1.DataSet.Open;
// Variant 3 - No error, but return all values like: Nombre as "??", HC and CI as (BLOB), but not show the values
// Nombre field is TEXT, HC and CI are BLOB fields
proxy := fProps;
stmt := proxy.NewThreadSafeStatement;
try
stmt.Execute(SQL_PEOPLE,true);
ds1.DataSet := ToClientDataSet(self,stmt);
// ds1.DataSet := ToDataSet(self,stmt); ------> This generates the same ole error
finally
stmt.Free;
end;
end;
This is the code that I try...
procedure TForm1.Button1Click(Sender: TObject);
const
SQL_PEOPLE = 'SELECT Nombre, HC, CI FROM Pacientes LIMIT 100';
begin
FreeAndNil(sqlite3);
sqlite3:= TSQLite3LibraryDynamic.Create('sqlite3.dll'); // sqlite3.dll in app root path, loaded ok
fDBFileName:= 'Pacientes.db3'; // This database was exported from example 12, using to file Btn
fProps := TSQLDBSQLite3ConnectionProperties.Create(StringToUTF8(fDBFileName),'','','');
ds1.DataSet.Free;
ds1.DataSet:= TSynDBDataSet.Create(self);
TSynDBDataSet(ds1.DataSet).Connection := fProps;
TSynDBDataSet(ds1.DataSet).CommandText := SQL_PEOPLE;
TSynDBDataSet(ds1.DataSet).IgnoreColumnDataSize := true;
ds1.DataSet.Open;
end;
I use the same sqlite3.dll from long time, that's why I use it externally.
The database that I'm testing is from my app, but to try, I uncrypt it. So, must work without problem.
The DataSet load the fields names wothout problem, but data in cells is wrong.... just show empty, or "X", or "?", etc...
Ok, now I can load table inside TDBGrid, but data is not ok. Only symbols appear. I try with my real database, with internal (statically linked) and external sqlite3.dll, and with the "test.db3" database that came with mORmot. Any of this options show real data when use other dataset.
DataGrid show real data from any database, without problem.
Why?
How can I open my real database with the password that I usually use?
Thanks
Thanks, I'll try after read it
YES, I just try it now and it's exactly what I was loocking for and I need..!!!! How I couldn't see it before..?
Please, now I have another question: mORmot only works with DrawGrids?
I need use QuickReport component for my reports, so I need a dataset for that.
Thanks again, thank you very much...
I think that 2nd way is the best for me. Where can I found any example, very simple, that implement it? Sorry if I insist in an example. I need start from any....
Thank a lot.
pd. Next, in future app I'll try with first method
Well, I need access to the same Sqlite3 database stored in a shared folder. Just that. When I know mORmot, it said: "you can use with multiple access". Maybe is not directly the multi access to a Slite3 database that mORmot give.
Please, any help with example?
Yes, I read the documentation, but everybody know that with an example you (an application developer) can start faster with new codes...
Hello:
I would like to learn how to use this framewok in my applications.
I have always used SQLite3 in my applications and now I need to use the databases in a network (not exactly as a client server, but as applications that share the same database from a network shared folder)
My applications use sqlite + Zeoslib.
I have read a lot about mORMot, but I can not understand how I can apply it to my interests, using already existing databases, which are also encrypted AES.
I ask for a simple example in which I can open an encrypted Sqlite3 database, which can be used with INSERT, UPDATE, SELECT, etc. and that can obtain a Query that allows me to link it to a dataset so that the results are published in grids . Mainly if this I can achieve using the Zeos components already.
I ask a lot, I know, but surely you can advise me with some existing example or directly through this way.
Thank you...