Jump to content
Magno

Getting Unknown storage format [BIN] even with the JSON storage

Recommended Posts

I am starting a very new Datasnap REST server. Made a simple function to return a query  but I am getting the error of the the title's post (Unknown storage format [BIN] ...) I dropped the Json storage for reflect, follow a lot of examples, that's simple, but simply does not works here. Any tip?

Share this post


Link to post

Looks hard at the provided examples of the problem, but draws a blank...

Share this post


Link to post
49 minutes ago, Lars Fosdal said:

Looks hard at the provided examples of the problem, but draws a blank...

I thought someone could understand, I am trying this: http://docwiki.embarcadero.com/RADStudio/Rio/en/Tutorial:_Using_a_REST_DataSnap_Server_with_an_Application_and_FireDAC

 

Have any table and need to create a function to return its result. The program is complaining that I should provide a valid standard storage (I am using http://docwiki.embarcadero.com/Libraries/Rio/en/FireDAC.Stan.StorageJSON.TFDStanStorageJSONLink

 

About the examples, there are a lot over there, as I told: not working. So whats the catch? Any tip?

Share this post


Link to post

I tried a simple new project, drop the required, following this example: http://docwiki.embarcadero.com/RADStudio/Rio/en/Tutorial:_Using_a_REST_DataSnap_Server_with_an_Application_and_FireDAC (same above)

 

So I get an error (as the title of this thread suggests) when running the following method: 

function TServerMethods1.GetDepartmentNames: TFDJSONDataSets;
begin
  // Clear active so that query will reexecute.
  FDQueryDepartmentNames.Active := False;
  Result := TFDJSONDataSets.Create;
  // The "TFDJSONDataSetsWriter" class provides static "ListAdd" method.
  // It uses reflection to convert results of the query into "TFDJSONDataSets".
  TFDJSONDataSetsWriter.ListAdd(Result, FDQueryDepartmentNames);
end;

 The unique difference is that the FDQueryDepartmentNames has another name and points to a similar very simple table with a "select * from users".

 

Share this post


Link to post
Posted (edited)

I have this same problem. Solved?

 

I need to access the REST / Datasnap server with angular 9.0. 
In this BIN format I cannot.

 

{"result": [{"type": "Data.FireDACJSONReflect.TFDJSONDataSets","id": 1,"fields": {"FDataSets": {"type": "System.JSON.TJSONObject","id": 2,"fields": {"FMembers": [{"type": "System.JSON.TJSONPair","id": 3,"fields": {"FJsonString": {"type": "System.JSON.TJSONString","id": 4,"fields": {"FValue": "FDQuery1","FIsNull": false,"FOwned": true}},"FJsonValue": {"type": "System.JSON.TJSONString","id": 5,"fields": {"FValue": "eJydVO1y0lAQPSkkIiKNGJVWbP3hC1SfIA3q+IFW0PqzEwtiZtLAQLDiu/iqieduPuZCYaYDTODs\r\n2Y+zd9mL2z0d7GNY/1cBUhgw0r20UoUN4A26+IIFRphhiROYwk4wxW9c4Ir8HD4sJgF3oF414C5e\r\nEqT19F4VVaJ3LGKWKAu+jwaaMPZh2DAewGjBeCi1P+MM56zdw2sM4MIpExNVr0HDY1CX1Ft+mzcY\r\nC3tS/xEeMxlK5YkItQutbULrlQ4kX2RbBF0J9NCn22OCEt/MW6js2MLmelojHC++0nEm8rplyaAy\r\nUaMUPbydrl7oQNLLaQ/ocPl8IzJvMBa5nVXXi2nKdQJXWjrnt7lmW3zvrLpaStN08kW7YGiPaf08\r\nxdzqsWTp812+5U+8rVaSpE+TtJOkzxLCoyQ9Tp8TNRnkI+Izllt4xElNMaQdy+3r83OMgCiWO9ri\r\nyXz8QEj+Y87XNa6GT8Tq5jqUnfBuz3BJq2DtFVY1WmQr/ILNRvjJiMzvEUW5tk+1iGjOHnuCA1Zc\r\n8PHom/K5JBOzR0fyQvFFZZeNFbbJM8bUVBVf8Q/Fpro6s89ulqyW9T+irTr5pZ3vlHhO1OLwVb4+\r\nLzvnvjNDTXNE1Yz5QLzEIa0Z+xlL/9m5i8ms+rJeC19bunVlFgH7iiUyYmyNVoC/0o/LjJB518xb\r\nCHZYcxOr/wZFvs1/4wB/iIac2YjVOxvnX8zT5uIFjLsumSa3ZaLZbdmeUGYTSKXC01nbsvd5P2oP\r\nQ9bxZOKR7OQc/wGJQuTy","FIsNull": false,"FOwned": true}},"FOwned": true}}],"FOwned": true}}}}]}

 

Edited by Vinicius Silva

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×