Quantcast
Channel: Embarcadero Community - Embarcadero Community
Viewing all 113 articles
Browse latest View live

DataSnap Server + JSON

$
0
0

Hello,

I am using Embarcadero RAD Studio XE6 to develop a mobile application.

Today I have been working on "DataSnap Server + JSON" following a webinar from Mobile Summer School, but I am getting an error when I run my project (Server and Client). The error is a "Find Package Import" windows which says: "Unable to find package import DataSnapServerMidas.bpi" screenshot below.

screenshot1.jpg

However, if I click the "Remove this reference" option, my server & client runs properly, but I would like to sort it out as soon as possible before to continue developing the application.

Thank you very much in advance,

Rafael.

 


Wizard error adding a New File "Add New"

$
0
0

Hi all,

 

I am getting an error which I'd like to share with you to know if anyone of you guys know the solution or reason.

I've created a DataSnape REST Server Application following the steps below:

1. Click on new/other/C++Builder projects/DataSnap Server --> I select DataSnap REST Application and click OK.

2. Settings:

    -Stand-alone Application

    -FireMonkey Application

    -Leave it as default: 8080 port, tested and running.

    -Leave it as default: Server Methods Class + Sample Methods + Sample Web Files added.

    -TDataModule

    -Location...

3. Save All

4. Run it  and I get this error asking for DataSnapServerMidas.bpi (which is posted on a differente question)


After that, I decided to add a new DataModule into my project, so I did:

1. Right Click on my project name.

2. Click on "Add New" and select "Other"

4. It runs the wizard to create a new file.

3. I select on "C++Builder Projects" the section "C++Builder Files" and I select DataModule.

4. I save all the files, I compile and then I get the below errors (screenshot3.jpg attached)

 

Thank you very much in advance,

Rafael.

TObjectList Firemonkey

$
0
0

Hi all,

Have someone used TObjectList before? I have used it in XE3 but now I am trying to use it in Firemonkey to create a list of classes but it complains when I compile in Android about "#include ", however if I compile for Windows it doesn't complain. 

Does someone know what is the reason or which library could I add instead of "#include "?

Thanks. 

What is Datasnap OnTrace used for?

$
0
0

What is Datasnap.DSServer.TDSServer.OnTrace?

And how is it used?

What it's like to do is to be able to send massages form my server methods and log them to a file.

The way I'm currently doing it via logging within the server methods unit is resulting in multiple accesses to the log file from different threads causing i/o errors.

Best approach for DataSnap?

$
0
0

What is the best approach to take for DataSnap; Windows Server or ISAPI?

By best I mean most reliable in a medium to high volume setting.

I have read some website that say DataSnap is not reliable and suggest that ISAPI may provide some benefit because IIS does the tread management. However, it was not clear if these articles were referencing the current version of DataSnap.

Gary

DataSnap VCL App server hangs if it is closed with open connections

TFDJSONdeDataSets behavoir

$
0
0

Hi All,

I'm trying to consume a dataset from a DataSnap TCP Service, these are code fragments:

Server code:

procedure TServerMethods1.EnviarPedido(ds: TFDJSONdeDataSets);

begin

qPed.Active := false;

qPed.AppendData(TFDJSONDataSetsReader.GetListValue(ds, 0));

qPed.Active := true;

qPedDeta.Active := false;

qPedDeta.AppendData(TFDJSONDataSetsReader.GetListValue(ds, 1));

qPedDeta.Active := true;

.......

end;

Client Code:

OCEnviar := TFDJSONDataSets.Create;

TFDJSONDataSetsWriter.ListAdd(OCEnviar, tOC);

TFDJSONDataSetsWriter.ListAdd(OCEnviar, tOCDeta);

No data gets to the server. Just to be sure I save the data as XML in the client to validate that OCEnviar is working OK and it is. I already use a sniffer to validate data is going to the server and it is but the sever shows no data.

Any idea,

Regards,

Al

DataSnap server doesn't return authentication error code

$
0
0

Hi All,

DataSnap VCL form server return the correct exception message on authentication error but not the error code associated with it. The exception is "'Remote error: Authentication manager rejected user credentials. This may due to invalid combination of DS user name and password'" and according to the documentation it should returnTDBXErrorCodes.InvalidUserOrPassword but 0 is returned instead.

Regards,

Al


datasnap server error

$
0
0

Hi,

I'm seeing this:

> 02/17/2015 12:09:50.564 Invalid command handle: 2

Every few days in my my datasnap server in the TServerContainer1.DSServer1Error event.

What does it mean and what is the next step to troubleshoot it?

Gary

DataSnap UserAuthenticate using database

$
0
0

DSAuthenticationManager1 UserAuthenticate is in WebModule1.

All the database related components and methods in TServerMethodsUnit1.

procedure TWebModule1.DSAuthenticationManager1UserAuthenticate(
Sender: TObject; const Protocol, Context, User, Password: string;
var valid: Boolean; UserRoles: TStrings);
begin

ServerMethodsUnit1.TServerMethods1.VerifyUser(User, Password);

// [dcc32 Error] WebModuleUnit1.pas(74): E2076 This form of method call only
// allowed for class methods or constructor
end;

How do I access a method in TServerMethods from TWebModule1?

here I want to access VerifyUser function which defined in ServerMethodsUnit1.

Please help.

Thank you,

Jeyan

Access Violation in module msvcrt.dll

$
0
0

I have one windows 7 computer on a site that throws up an exception access violation 751E9CC6 in module 'msvcrt.dll'. It occures only on this one computer. The program uses REST datasnap and FMX multiplatform the error occurs after the datamoduleunit1 has been created.Thanks

Read Active Directory / LDAP via SQL query.

$
0
0

I need to query my Active Directory Domain and place the results in a table. Are there components for this that I'm not seeing? If not, is there a 3rd party provider that has the tools that you can name for me.

ADSI's 1000 record limit is an issue so I need something that will get me past that limitation.   

Email

$
0
0

Hi All,

 

Am in a fix and want to know how i can resolve this issue. I have an application developed in delphi XE7 and indy components. I have placed it into an application server. From the architecture diagram we have the application server only allowed connection to the mail server. When a user tries to send an email then the application picks the users computer IP and not the servers IP hence connection to mail server is rejected. How can i go around solving this. Thank you.

 

--

Zack

TDSRestConnection TimeOut ENetHTTPClientException

$
0
0

Hello,

using a DataSnap REST Serve, when consuming a method that takes 30 seconds or more to return, the client application this exception occurs "ENetHTTPClientException".

 

Is there any TimeOut option to configure on TDSRestConnection?

Or some other solution?

 

Using Delphi 10 Seattle.

 

Thanks.

TSQLConnection DataSnap driver IPv6

$
0
0

In an App that I have build - which works fine on my iPhone (4G) and iPad (WiFi) - I'm using a TSQLConnection bound to the DataSnap driver. The driver settings has CommunicationIPVersion set to 'IP_IPv6', the protocol is set to 'https' and the hostname has the form of 'ahost.ondomain.nl'. For this project I'm using Delphi Seattle.

However, I can't get my project through the Apple App Store Review stage because at Apple they cannot connect to my application server within their IPv6 environment. The server where the application server resides is a IPv4 server. Could that be the problem or is there anything I can do within my application?


TRESTRequest error when downloading images

$
0
0

Hi,

 

I have an application that downloads images from a webroker app and this was working fine on Delphi Seattle, but when i tried to port it to Berlin, now i get an error.

"REST request failed: No mapping for the Unicode character exists in target multi-byte code page"

{Client side}
JpegFile:=ExtractFilePath(ParamStr(0)+'badge.jpg');
  LRestRequest.Timeout := 10000;
  LRestRequest.Params.Clear;
  LRestRequest.Resource:='GetImage';
  LRestRequest.AddParameter('username','USR');
  LRestRequest.AddParameter('password','PWD');
  LRestRequest.AddParameter('EventID','E0000x');
  LRestRequest.AddParameter('PhotoName','_Badge');
  LRestRequest.Execute;
  if LRestResponse.StatusCode = 200 then
  begin
    FileStream:=TFileStream.Create(JpegFile, fmCreate or fmOpenWrite);
     try
      FileStream.WriteData(LRestResponse.RawBytes, Length(LRestResponse.RawBytes));
     finally
        FileStream.DisposeOf;
     end;
  end;

{Server side}
var
 Image:String;
begin
    Image:=ExtractFilePath(ParamStr(0)) + 'TestImage.jpg';
    if FileExists(Image) then
     begin
      Response.ContentType:='image/jpg';
      Response.ContentStream:=TFileStream.Create(Image ,fmOpenRead or fmShareDenyNone );
     end else
     Response.StatusCode:=404;

 is there any fix this?

 

Thanks

Mauricio Herrera

TDSRestConnection and string parameters

$
0
0

Hi all,

We have a small 3-tier application with a DataSnap-server and a windows-client
using a TDSRestConnection component to connect to this datasnap server over HTTP/REST.
We have several server-methods with string parameters.
In Delphi 10.1 Berlin the spaces in these string parameters are replaced by plus-signs (+)

One can easily reproduce this effect.
Create a basic datasnap server with sample methods using the datasnap server wizard.
(VCL Forms application, protocol HTTP, include sample methods and use a TDSServerModule as ancestor type for the server methods)

Create a windows VCL-client with a TDSRestConnection component to make the connection with the server.
Call the sample ReverseString method with for instance "Hello   world" as parameter. (3 spaces between the words)
The server will return "Hello+++world"

This effect is only visible with Delphi 10.1 Berlin, not with Seattle.
Anyone an idea how to avoid this or is this a bug ?

Regards
Freddy

IPv6 Datasnap (IOS App)

$
0
0

At WWDC 2015 they announced the transition to IPv6-only network services in iOS 9. Starting June 1, 2016 all apps submitted to the App Store must support IPv6-only networking.

My IOS app have a IPv4 IP, im using a TDSRestConnection now in the Host property i set 2112:d8ac:64c4::d8bc:64c4 and say "error is socket error11004"
How i make my IOS app use IPv6


I use XE8, Datasnap Rest Server

Delphi XE2 - switching license to another machine

$
0
0

          Hi, we have some enterprise licenses Delphi XE2, some unused. We need to know, in the case of assignment of the license from one machine to another, the correct procedure to register the license to the new machine. Is it mandatory to communicate the change of the associated machine to Embarcadero support? Thanks and regards Alessio

Need new TRESTContentType named ctAPPLICATION_HAL_JSON

$
0
0

How can I added a new http TRESTContentType named ctAPPLICATION_HAL_JSON so I can post Application/HAL+JSON requests to my REST server via a RESTRequest parameter?  

Viewing all 113 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>