#2 Re: mORMot 1 » How to add sql order by in CreateAndFillPrepareMany » 2017-12-01 05:37:44

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

#4 mORMot 1 » How to add sql order by in CreateAndFillPrepareMany » 2017-12-01 05:03:17

tiger
Replies: 7

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

#6 Re: mORMot 1 » Http client-server + MS SqlServer2000 run "OLE DB Error Occurred" » 2015-11-22 12:33:41

sorry,I don't know what's your mean.forgive my poor english.

#7 mORMot 1 » Http client-server + MS SqlServer2000 run "OLE DB Error Occurred" » 2015-11-22 11:44:22

tiger
Replies: 4

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?

#9 PDF Engine » how can i load a pdf file exists? » 2014-05-22 04:18:07

tiger
Replies: 2

I can not find loadformfile in syspdf.pas,and may I implement it myself?

#10 Re: mORMot 1 » can not create sqlite3 db in a path which have chinese » 2014-05-15 15:17:33

thanks ab.it turned to be my default.i test with sqlite example which run success.

#11 mORMot 1 » can not create sqlite3 db in a path which have chinese » 2014-05-14 09:13:41

tiger
Replies: 2

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?

Board footer

Powered by FluxBB