You are not logged in.
Pages: 1
thank @ttomas! it works.
20171201 21322244 EXC ESQLite3Exception {"ErrorCode":1,"SQLite3ErrorCode":"secERROR","Message":"Error SQLITE_ERROR (1) [select A.RowID AID,A.Name A00,A.Memo A01,B.RowID BID,C.RowID CID,C.Name C00,C.Leaf C01,C.View C02,C.IconCls C03,C.Expanded C04,C.RouteId C05,C.ParentId C06,C.DispOrder C07 from Role A,RolePermission B,Permission C where B.Source=A.RowID and B.Dest=C.RowID and (A.ID = ? order by DispOrder)] using 3.20.1 - near \"order\": syntax error, extended_errcode=1"} at 00757916
remove "order by DispOrder", it will be ok.
i want to use sql order by in CreateAndFillPrepareMany,but when i do this:
Role := TSQLRole.CreateAndFillPrepareMany(Client,'ID = ? order by DispOrder',[],[aId]);
an error occurred:
20171201 20163660 ERROR mORMotHttpClient.TSQLHttpClientWinHTTP(01736650) GET root returned 400 (Bad Request) with message { "errorCode":400, "errorText":"Bad Request" } stack trace API 0064002E 006F3D7B 006FE542 006FF111 006EBE58 006EC0FF 006EB0A6 007FDBE5 0073ECDB
20171201 20163660 EXC EModelException {"Message":"TSQLRole.CreateAndFillPrepareMany(): FillPrepareMany() failure"} at 006EB0D0 stack trace API 0063E09F 0063E0C8 0040AE7C 77D56D4B 77D56BD7 006EB0D0 007FDBE5 0073ECDB
20171201 20163660 EXC EModelException {"Message":"TSQLRole.CreateAndFillPrepareMany(): FillPrepareMany() failure"} at 006EB0D0 stack trace API 0063E09F 0063E0C8
20171201 20163660 info mORMotHttpClient.TSQLHttpClientWinHTTP(01736650) TSQLHttpClientWinHTTP.Destroy
20171201 20163660 EXC EModelException {"Message":"TSQLRole.CreateAndFillPrepareMany(): FillPrepareMany() failure"} at 006EB0D0 stack trace API 0063E09F 0063E0C8
20171201 20163660 debug mORMotSQLite3.TSQLRestServerDB(01706750) TSQLRestRoutingREST.Error: { "errorCode":500, "error": {"EModelException":{ "ClassName":"EModelException", "Address":"006EB0D0 ", "Message": "TSQLRole.CreateAndFillPrepareMany(): FillPrepareMany() failure" }} }
20171201 20163660 srvr mORMotSQLite3.TSQLRestServerDB(01706750) GET root/MyApp.GetPermissionTree SOA-Interface -> 500 with outlen=194 in 1595464 us
I use Delphi 10 Seattle and mORMot was the latest.
sorry,I don't know what's your mean.forgive my poor english.
server side code:
var
Props: TSQLDBConnectionProperties;
procedure TForm1.FormCreate(Sender: TObject);
begin
Props := TSQLDBUniDACConnectionProperties.Create(
TSQLDBUniDACConnectionProperties.URI(dMSSQL,'localhost:1433'),'Test', 'sa', '123');
HttpServer := TSQLDBServerHttpApi.Create(Props,'root','888','user','pass');
end;
client side code:
var
Props: TSQLDBConnectionProperties;
procedure TForm1.FormCreate(Sender: TObject);
begin
Props := TSQLDBWinHTTPConnectionProperties.Create('localhost:888','root','user','pass');
DS1.DataSet := ToDataSet(DS1,Props.Execute('select * from Role',[]))
end;
client exe will run a error:
TSQLDBWinHTTPConnectionProperties.Process(cExecuteToBinary): server raised EUniError with 'OLE DB Error Occurred'. code 800401F0h. CoInitalize has not been called.
How can I sovle it?
thanks for reply。
I can not find loadformfile in syspdf.pas,and may I implement it myself?
thanks ab.it turned to be my default.i test with sqlite example which run success.
hi AB:
when my program's path like c:\dev\测试, and i run program to create a sqlite3 db with delphi7,it will report a error:invalid sqlite3 database handle(14) . howerver, when i run this program with xe5 or change chinese to english of the path,it will be success.
i follow the source code in synSQlite3.pas,i know it could be in
function TSQLDataBase.DBOpen: integer;
line 3444 utf8 := fFilename;
i changed it utf8 := StringToUTF8(fFilename);it didn't work.how can I do?
Pages: 1