You are not logged in.
Sorry but I can not understand how the writing of server SQLite.
I have a client/server application, the server writes in dir C: \ programdata \ DB \ SQLiteXXX.db.
If I run the My Server as Administrator and then I use SQLiteadmin.exe to read the database I do not see even a record. only if I run SQLiteadmin.exe as Administrator I can read the records entered by a client.
I'm doing something wrong, then I ask you this because if I run the server as an administrator but not as a normal user writes other records in the same table.
If I add new fields and tables in the database does not save the relationship with the new tables, but if you destroy and create a new database works fine. Why?
How do I modify a database of my clients if they lose their data every time I make a program copy from a old database to the new one?
Thanks Corchi
I have Win7 64bit and XE2
Offline
ok I understand
What about the problem of relations
If I add new fields and tables in the database does not save the relationship with the new tables, but if you destroy and create a new database works fine. Why?
Offline
I mean relation for the class "TSQLRecordMany"
I added 2 property (TSQLRecordMany) in an existing table with data
self.Relazione1.add (ADatabase, Self.ID, newID, true); does not work ,the error occurs 405
Offline
The mORMot tables HAVE to be created by the ORM.
Forget about SQLiteAdmin or whatever external tool to administrate the DB.
Use the external tools to browse the DB, not the generate it.
Could you provide some short code to reproduce the problem, please?
Offline
No I do not use SQLiteAdmin.exe to insert new tables, but the framework, automatically creates the new tables and field from the classes and property that I specified in the model file.
So I added the classes that have generated new tables, but I realized that generated session only Administrator and not that of my user, ie if I open the database with SQLiteAdmin.exe see the tables only if I run it as Administrator otherwise I can not see and so does the framework seems to me
this is the exist table and I added only property "fFastReports: TSQLMailFastReports;" this is the existing table and I added only property "fFastReports: TSQLMailFastReports;" and the rispective classes of the new tables TSQLFastReport(TSQLReport) .
NB: TSQLReport already existed!
TSQLMail = class(TSQLFile)
private
fOwner: RawUTF8;
fSubject: RawUTF8;
fBody: RawUTF8;
fEnableMail: Boolean;
fReports: TSQLMailReports;
fFastReports: TSQLMailFastReports; //I insert this row in new version
fRecipients: TSQLMailRecipients;
fAttachment: RawUTF8;
fRecipient: RawUTF8;
// Mail
fMailAuthenticate: Boolean;
fMailUsername: RawUTF8;
fMailPassword: RawUTF8;
fMailSMTPPort: Integer;
fMailHost: RawUTF8;
fMailFrom: RawUTF8;
fMailTitle: RawUTF8;
public
constructor Create; override;
published
property Subject: RawUTF8 read fSubject write fSubject;
property Body: RawUTF8 read fBody write fBody;
property EnableMail: Boolean read fEnableMail write fEnableMail;
property Reports: TSQLMailReports read fReports;
property FastReports: TSQLMailFastReports read fFastReports; //I insert this row in new version
property Recipients: TSQLMailRecipients read fRecipients write fRecipients;
property Attachment: RawUTF8 read fAttachment write fAttachment;
property Recipient: RawUTF8 read fRecipient write fRecipient;
property MailAuthenticate: Boolean read fMailAuthenticate write fMailAuthenticate;
property MailUsername: RawUTF8 read fMailUsername write fMailUsername;
property MailPassword: RawUTF8 read fMailPassword write fMailPassword;
property MailSMTPPort: Integer read fMailSMTPPort write fMailSMTPPort;
property MailHost: RawUTF8 read fMailHost write fMailHost;
property MailFrom: RawUTF8 read fMailFrom write fMailFrom;
property MailTitle: RawUTF8 read fMailTitle write fMailTitle;
end;
//I inserted the following lines into the new database model.
TSQLScheReport = class(TSQLReport)
private
fObjRecordClass: TypeRecordClass;
fRefID: Integer;
fPrinter: RawUTF8;
public
constructor Create; override;
published
property Printer: RawUTF8 read fPrinter write fPrinter;
property ObjRecordClass: TypeRecordClass read fObjRecordClass
write fObjRecordClass;
property RefID: Integer read fRefID write fRefID;
end;
TSQLMailFastReports = class(TSQLRecordMany)
private
fSource: TSQLMail;
fDest: TSQLScheReport;
published
property Source: TSQLMail read fSource;
property Dest: TSQLScheReport read fDest;
end;
Last edited by corchi72 (2013-05-15 07:47:35)
Offline