You are not logged in.
Pages: 1
Hello,
I am also curious to the answer on the question above.
in code below, a cascaded delete as defined in the database does not work...
bRC:=Database.Delete(TSQLPatients, iID);
While when deleting the record in a database tool, the cascaded delete works fine... how come?
Regards,
Maurijn
It now suddenly works... :-)
Possibly because I downloaded the newest version of the framework...
Hi again,
I was trying to think ORM and did what you write above: Database.Add(aPatientAppointements)...
But then an error occured: unrecognized token: "{"
any idea what this error causes?
Hello,
I am trying to insert 2 values in a table with 2 columns (+ ID). The columns where the values are to be stored do both have a foreign key relation; both to some other table.
Why does the code below not work?
in declaration: data: TSQLTable;
sSQL := 'insert into PatientAppointments (patient_id, appointment_id) values (' +
IntToStr(aPatient_id) + ', ' + IntToStr(aAppointment_id) + ')';
data:=Database.ExecuteList([], sSQL);
Database.Commit();
Please don't tell me to use the function 'ManyAdd' as I do not have columns named Dest and Source....
Regards,
Maurijn
It surely helped! Thanks a lot!
Regards,
Maurijn
Hello,
I am new to mORMot and have built some code to learn it. But I cannot figure out how to retrieve data sorted when using CreateAndFillPrepare (from a table by using an TSQLRecord).
How can I change the code below to retrieve my data sorted?
In the code below TSQLPatientsis just an TSQLRecord with some properties.
patients := TSQLPatients.CreateAndFillPrepare(DatabaseClient, '');
cbListPatients.Clear();
try
while patients.FillOne do
begin
Inc(iTemp);
cbListPatients.AddItem(patients.name, Pointer(patients.id));
cbListPatients.Checked[iTemp]:= (patients.active='y');
end
finally
FreeAndNil(patients);
end;
I am curious to read the answer...!
Regards,
Maurijn
Pages: 1