You are not logged in.
Pages: 1
Problem solved.
Go to Project Options -> Delphi Compiler -> Output C/C++ and under
C/C++ output file generation select Generate DCUs only.
after add mORMot to bpl package and build with enable USEPACKAGES
Build error message.
How to fixed ?
Thank you.
Thank you.
Hi,
I convert 16 - Execute SQL via services to lazarus Error
error message : No RTTI available for IIRemoteSQL: please define the methods using a TInterfaceFactoryGenerated wrapper
how can i fixed this problem?
mORMot stop a few minute after start with IIS
when comment SynRestMidasVCL.pas 2 line RedirectCode
constructor TSynRestDataSet.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
//RedirectCode(@TSynRestDataset.DataConvert, @TSynRestDataset.DataConvertPatch, @fDataConvertPatchBackup);
fProvider := TDataSetProvider.Create(Self);
fProvider.Name := 'InternalProvider'; { Do not localize }
fProvider.SetSubComponent(True);
fProvider.Options := fProvider.Options+[poAllowCommandText];
fProvider.OnUpdateError := DoOnUpdateError;
SetProvider(fProvider);
fDataSet := TSynRestSQLDataSet.Create(Self);
fDataSet.Name := 'InternalDataSet'; { Do not localize }
fDataSet.AfterInsert := Self.DoOnAfterInsert;
fDataSet.AfterOpen := Self.DoOnAfterOpen;
fDataSet.SetSubComponent(True);
fProvider.DataSet := fDataSet;
end;
destructor TSynRestDataSet.Destroy;
begin
fDataSet.AfterInsert := nil;
fProvider.DataSet := nil;
FreeAndNil(fDataSet);
FreeAndNil(fProvider);
//RedirectCodeRestore(@TSynRestDataset.DataConvert, fDataConvertPatchBackup);
inherited;
end;
datetime , date , time field is work fine for mORMot Commit number 1.18.3854
EZSQLException ("SQL Error: no connection to the server"). How to zeoslib auto reconnect like firedac?
UniGui's is session based,you should create connection per session and free the connection when unused or reuse the connection to safe
How to SQL Command Extract Date like yyyy/mm/dd from TModTime and TCreateTime ? My RDBMS is MySQL.
@ab, Thank you i will send small sample to you later.
this my function
var
Cds:TClientDataSet;
i:integer;
begin
Cds:=TClientDataSet.Create(nil);
try
JSONToClientDataSet(cds,GetDataSet(strSQL),nil,cdsNew,false);
Result := cds.data;
finally
Cds.Free;
end;
end;
My Database Field Type is "Decimal(18,4)"
Do you mean "decimal" in which context?
Our code handles sftCurrency kind of content, which holds number with fixed decimals.
If your TSQLTable has the expected type information for the columns, as input to ToClientDataSet function, there is no problem.It is not clear what you meant here...
GetDBFieldDef result sftUnknown
when use ToClientDataSet from mORMotMidasVCL.pas TSQLFieldType is not support DECIMAL fields
How to mORMot Restfull Server or SOA as a Windows Service , i want to start service automatic when windows start without logon.
thank you.
SOA when call many time return Not Found
Client:
TInterfacedObjectFakeClient.FakeCall(IRestMethods.GetRunningCode) failed: 'URI root/RestMethods.GetRunningCode ["ACCM_GL00ITM_RUNNO"] returned status 'Not Found' (404 - Network problem or request timeout)'
Server :
i do something wrong?
@EMartin, lastest your demo when change TSQLRecord (TSQLBiolife ) field
fModified:TModTime; --- to ---> fModified: TDateTime;
after rebuild all and run again your demo is error TDateTime Field.
Delphi Berlin upd1
thank you.
how to enhance the timeouts on client side.
or client side can do callback function?
TInterfacedObjectFakeClient.FakeCall(IRemoteSQL.Execute) failed: 'URI root/RemoteSQL.Execute/4
returned status 'Invalid Request' (501 - Server not reachable or broken connection)'.
error message:
/usr/bin/ld: cannot find fpc-linux64/sqlite3-64.o
/usr/bin/ld: cannot find libgcc.a
how to fixed.
thank you.
Thank you. Ab
i mean like this post
http://synopse.info/forum/viewtopic.php?id=1664
after delete all data of table the ID already continued value. i want to reset id to start from number 1 when the table is empty
,How to flush the cache?
i'm sorry, i mean reset to 1
lastest SynRestVCL and SynRestMidasVCL. when use ForceID the database insert only ID field and another fields is empty value. how to fix this problem?
this version https://drive.google.com/open?id=0B0BLh … XM1amVzdlE
when change
SynRestVCL.pas
line 733
fInsertedID := fRestClient.Add(fRec, fRec.RecordProps.FieldBitsFromCSV(fFieldNames), True);
to
fInsertedID := fRestClient.Add(fRec,True,true);
ForceID is work.
how to reset table id to 0 or any number?
Thank a lot.
after add mORMot to bpl package and build
delphi error is :
---------------------------
Error
---------------------------
Cannot open file "C:\SampleBpl\SynBidirSock.pas". The system cannot find the file specified.
---------------------------
OK
---------------------------
how to fix this problem? my mORmot is lastest . thank you.
Switch to a SOA design.
Exposing all your process using mORMot interface-based services.
Defining DTO objects/records for transmission, and leaving your business objects on the server side.It is worth taking a look at the framework documentation.
See the FAQ at http://synopse.info/files/html/Synopse% … l#TITL_123
Do you have a great example CRUD with SOA ?
thank you.
thank you.
how to make mORMot scheduled jobs running like cron , windows schedule , mysql event?
i think everythink is right. but atfer get with this signutl server rerturn :
{
"errorCode":403,
"errorText":"Forbidden"
}
i modify some code all work fine until this method
public String sessionSign(String url) {
long Tix;
Date d = new Date();
Tix = d.getTime();
if(lastSessionTickCount == Tix)
Tix += 1;
lastSessionTickCount = Tix;
String aNonce = Long.toHexString(Tix);
while(aNonce.length() < 8)
aNonce = '0' +aNonce;
if (aNonce.length() > 8)
aNonce = aNonce.substring(aNonce.length() - 8, aNonce.length());
String ss = Long.toHexString(getCRC32(url,
getCRC32(aNonce, sessionPrivateKey)));
while(ss.length() < 8) { ss = '0'+ss; }
String s = url.indexOf("?") == -1 ? url+ "?session_signature=" : url+ "&session_signature=";
System.out.println("## sessionIDHexa8="+sessionIDHexa8+" ,aNonce="+aNonce+" ,ss="+ss+" ,s="+s);
return s + sessionIDHexa8 + aNonce + ss;
}
i am not understand 2 variable (aNonce,ss) , the value of aNonce,ss not same javascript at below , sessionIDHexa8 is same as javascripts
Client.prototype.signUrl = function (url) {
if (Client._instance.loggedIn === true) {
var Tix, Nonce, s, ss, d = new Date();
Tix = d.getTime() - Client._instance.SessionTickCountOffset;
Nonce = Tix.toString(16);
while (Nonce.length < 8) {
Nonce = '0' + Nonce;
}
if (Nonce.length > 8) {
Nonce = Nonce.slice(Nonce.length - 8);
}
ss = Client._instance.crc32(url, Client._instance.crc32(Nonce, Client._instance.SessionPrivateKey)).toString(16);
while (ss.length < 8) {
ss = '0' + ss;
}
s = url.indexOf("?") === -1 ? url + '?session_signature=' : url + '&session_signature=';
console.log("SessionIDHexa8="+Client._instance.SessionIDHexa8+" , Nonce="+Nonce+" ,ss= "+ss+" ,s="+s);
return s + Client._instance.SessionIDHexa8 + Nonce + ss;
} else {
return url;
}
};
thank you warleyalex
java for android studio
How to mORMot authenication from android please sample to me
i found this
http://synopse.info/forum/viewtopic.php … 515#p12515
but i am not javascript expert , i can not convert to java
thank you.
thank you
How to mORMot reconnect after mysql server gone away
When change from FireDAC to ZEOS every think work fine.
What difference?
What is wrong?
begin
// set logging abilities
SQLite3Log.Family.Level := LOG_VERBOSE;
//SQLite3Log.Family.EchoToConsole := LOG_VERBOSE;
SQLite3Log.Family.PerThreadLog := ptIdentifiedInOnFile;
// ODBC driver e.g. from http://ftp.postgresql.org/pub/odbc/versions/msi
//aProps := TODBCConnectionProperties.Create('','Driver=PostgreSQL Unicode'+
// {$ifdef CPU64}'(x64)'+{$endif}';Database=postgres;'+
// 'Server=localhost;Port=5433;UID=postgres;Pwd=postgresPassword','','');
FDPhysMySQLDriverLink := TFDPhysMySQLDriverLink.Create(Nil);
aProps := TSQLDBFireDACConnectionProperties.Create('MySQL?Server='+_SERVERIP,_DBNAME,_DBUSRNAME,_DBPASSWD);
// aProps.ForcedSchemaName := 'sam';
try
// get the shared data model
aModel := DataModel;
VirtualTableExternalRegisterAll(aModel, aProps, false);
try
// create the main mORMot server
aRestServer := TSQLRestServerDB.Create(aModel,SQLITE_MEMORY_DATABASE_NAME,false); // authentication=false
try
// create tables or fields if missing
aRestServer.CreateMissingTables;
// serve aRestServer data over HTTP
aHttpServer := TSQLHttpServer.Create(SERVER_PORT,[aRestServer],'+',useHttpApiRegisteringURI);
try
aHttpServer.AccessControlAllowOrigin := '*'; // allow cross-site AJAX queries
writeln('Background server is running.'#10);
write('Press [Enter] to close the server.');
readln;
finally
aHttpServer.Free;
end;
finally
aRestServer.Free;
end;
finally
aModel.Free;
end;
finally
aProps.Free;
end;
end.
aProps := TODBCConnectionProperties.Create('','Driver=PostgreSQL Unicode'+
{$ifdef CPU64}'(x64)'+{$endif}';Database=postgres;'+
'Server=localhost;Port=5433;UID=postgres;Pwd=postgresPassword','','');
change to
FDPhysMySQLDriverLink := TFDPhysMySQLDriverLink.Create(Nil);
aProps := TSQLDBFireDACConnectionProperties.Create('MySQL?Server='+_SERVERIP,_DBNAME,_DBUSRNAME,_DBPASSWD);
after run the error is :
---------------------------
ESQLite3Exception with message 'Error SQLITE_ERROR (1) [INSERT INTO Person (Name) VALUES (?);] using 3.11.1 - no such table: Person, extended_errcode=1'.
please help me
thank you.
Pages: 1