Reading a TDataset from a REST server in a Delphi Client

Hi,

I wrote a REST Server in XE2 - that generally works fine - and I am able to use it from a Javascript client.

We also wanted to use it in a Delphi client - and I have never written code with a Delphi client that accepts a dataset from a REST server.

Basically, when I call my proxy (my Delphi code is in Delphi XE, where our client application is) - I get an error message, EDatabaseError 'Missing query, table name or procedure name'

Any ideas what this is all about? I tried to replace the TDataset with a TClientDataset and the problem is the same.

Any ideas where to continue from here? I am able to return datasets from the rest server and process them properly in my web applications with javascript.

The code is very simple - 

  HostDB := Proxy.GetChangesSince(SyncDate);

Where HostDB is a TDataset (As I said, I also tested it as a TClientDataset).

Thanks,
  Ron.
0
Ron
6/28/2012 9:07:08 PM
embarcadero.delphi.multi-tier 396 articles. 0 followers. Follow

1 Replies
1064 Views

Similar Articles

[PageSpeed] 31

Hi Ron. I am about to start my first SE Rest based service. I have14 years experiance working with the old MIDAS  and am hoping it will be much the same. I have a lot of experiance writing Delphi Data clients using the olde MIDAS server, and it should be the same (I hope)

If you are interested, Id am keen to contact you to share expeiances as I move forward. How can we exchange Emails outside of this forum ?

There seems to be nothing happening on this Forum.

> {quote:title=Ron Levy wrote:}{quote}
> Hi,
> 
> I wrote a REST Server in XE2 - that generally works fine - and I am able to use it from a Javascript client.
> 
> We also wanted to use it in a Delphi client - and I have never written code with a Delphi client that accepts a dataset from a REST server.
> 
> Basically, when I call my proxy (my Delphi code is in Delphi XE, where our client application is) - I get an error message, EDatabaseError 'Missing query, table name or procedure name'
> 
> Any ideas what this is all about? I tried to replace the TDataset with a TClientDataset and the problem is the same.
> 
> Any ideas where to continue from here? I am able to return datasets from the rest server and process them properly in my web applications with javascript.
> 
> The code is very simple - 
> 
>   HostDB := Proxy.GetChangesSince(SyncDate);
> 
> Where HostDB is a TDataset (As I said, I also tested it as a TClientDataset).
> 
> Thanks,
>   Ron.
0
Tony
7/5/2012 1:06:52 AM
Reply:

Similar Artilces:

Update TDataSet data requested from REST server (Using Delphi XE2)
Hello all, I'm trying the Delphi REST possibilities. So far, I've created a server application (VCL SA) which can return a TDataSet based on a query parameter. I've shown the dataset in a TDBGrid using an TClientDataSet. Using the ClientDataset I can modify the data of the client dataset. Now I would like to 'commit' the changes made to the clientdataset to the REST server. How can I accomplish this? Also, how can I get a Java wrapper, which can then be used by non-delphi clients (web, servoy, iOS) to get the same functionality PS: we also have Delp...

ANN: DataSnap-like Client-Server JSON RESTful Services in Delphi 7-2010 [Edit]
How to implement a very useful service... say... adding two numbers? In our framework, you code Server-Side: {code} function TSQLRestServerTest.Sum(aRecord: TSQLRecord; aParameters: PUTF8Char; const aSentData: RawUTF8; var aResp, aHead: RawUTF8): Integer; var a,b: Extended; begin if not UrlDecodeNeedParameters(aParameters,'A,B') then begin result := 404; // invalid Request exit; end; while aParameters<>nil do begin UrlDecodeExtended(aParameters,'A=',a); UrlDecodeExtended(aParameters,'B=',b,@aParameters); end; aRes...

Delphi and Delphi for .Net
It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. I would like to know is it true all .Net application is slower than Win32 native applicaiton or it is Delphi for .Net only. Your information is great appreciated, Inung On 2011-06-21 18:20:17 +0100, Inung Huang said: > It seems that Delphi for .Net is slower than Delphi Win32 native applicaiton. > I would like to know is it true all .Net application is slower than > Win32 native applicaiton or it is Delphi for .Net only. If you are only running the code in the application once then, yes, yo...

Access to legacy (Delphi 4) Midas server from Delphi XE2
Hello, My company biggest product is developped with Delphi 4 and uses several Midas servers. It's a really big application (still in evolution, since 1997) , that has been started with Delphi 3. A partial or complete rewrite of this application is planned in a mid term future, and I must study if we can envisage a soft migration of some parts of the software on Delphi XE2 (or XE4), or if a complete rewrite even of the servers parts is required. If a complete rewrite must be done, my boss doesn't exclude to study the possibility of using another development environment to rewri...

Delphi 2009 Datasnap server and client
Hello, I am trying develop Datasnap server and client. I have a type TStringArray = array of string;. I used this type in one of server method. When I am trying to Generate Datasnap Client classes it says 'Remote error:Unknow data type: TStringArray'. How can I register this data type? -- Best Regards Md. Shariful Alam Khan Hello, Isn't there anyone to answer my question? Also I am getting same error if I use TStrings or TWideStringArray. Best Regards Md. Shariful Alam Khan "Md. Shariful Alam Khan" <murad_mouri@yahoo.com> wrote in messag...

REST Server using Delphi Prism?
Hi, I've just been having a short 'self training' session and watched the interesting David I webinar on RAD/AJAX web apps within D2010. Whilst he touched on some great stuff, especially around REST, the one aspect that he didn't mention was whether it was possible to develop REST based servers within Delphi Prism. A little digging unearthed some [WCF links|http://msdn.microsoft.com/en-gb/netframework/cc950529.aspx] which suggesst it +is+ possible, but this all seems to be very C# based. Before I work through this, has anybody tried anything similar in Prism or kn...

c# server
I have serious problems with web-services. I implement this scenario: I developed a web-service in c# using VS2005. Here is my test method:   [WebMethod]  public string TwoStrings(string one, string two)  {   return one + two;  } When I use the web-service using a c# client it works. But when I use it with a delphi client, it returns always null. I used a SoapExtension to compare two requests. There are some differents: Request from C# (it works):------------------------------- <?xml version="1.0" encoding="utf-8"?> <s...

Problem upgrading web service client from Delphi 7 to Delphi XE
In trying to upgrade our web service client to Delphi XE we have now get a web service error of Invalid Format. When we examine the SOAP request we see the following differences from Delphi 7 vs Delphi XE In Delphi 7 we get <SomeStuff xmlns="" xsi:nil="true" /> In Delphi XE we get <SomeStuff xsi:nil="true" /> We have narrowed the failure down to these differences in the client request. Is there anyway to get Delphi XE to generate a SOAP request with the xmlns attribute set to blank as it used to be? Hello, > In trying to u...

Access to legacy (Delphi 4) Midas server from Delphi XE2 [Edit]
Hello, My company biggest product is developped with Delphi 4 and uses several Midas servers. It's a really big application (still in evolution, since 1997) , that has been started with Delphi 3. A partial or complete rewrite of this application is planned in a mid term future, and I must study if we can envisage a soft migration of some parts of the software on Delphi XE2 (or XE4), or if a complete rewrite even of the servers parts is required. If a complete rewrite must be done, my boss doesn't exclude to study the possibility of using another development environment to rewri...

"Sneak Preview: Delphi 2011 is Delphi XE"
Today, Delphi's Welcome page showed this: Sneak Preview: Delphi 2011 is Delphi XE http://www.embarcadero.com/rad-studio-xe-preview When trying to watch the video, it gives an error message: Server not found: rtmp://etnastream01.embarcadero.com/vod/ How nice :-( Achim Achim Kalwa wrote: > Sneak Preview: Delphi 2011 is Delphi XE > http://www.embarcadero.com/rad-studio-xe-preview > > When trying to watch the video, it gives an error message: > > Server not found: > rtmp://etnastream01.embarcadero.com/vod/ Works for me on second try (first ...

Delphi Rest Server User/Password authentication
Newbie to Datasnap here..... I'm using Basic4Android to create a client for my Datasnap Rest Server. I want to validate the User and Password in the DSAuthenticationManager's OnAuthenticate event. But thus far I have not been able to get the Username and Password to pass over to the server. I am sure I don't understand how this works........can you verify for me how it might work? I mean, should I expect this to work? http://192.168.0.100:8080/datasnap/rest/DSAdmin/GetPlatformName?username=" & [USERNAME] & "&password=" & {PASSWORD] ...

Transferring Delphi 5 BDE code to Delphi 2006 Nexus Embedded server code
In an application where I have used BDE in Delphi 5 I would like to transfer the whole project to Nexus Embedded server that in general implies mostly exchanging tTable with tnxTable etc. But, in a procedure I regenerate indexes using dbiRegenIndexes(basehandler). This function seems not to be supported anymore, so I just wonder if such a call is needed at all in Nexus Embedded Server, and if needed, what is now the correct syntax ?? I don't know the answer to your question but if you can't find answers here you may like to know that nexus db have there own free newsgr...

Blob Field through DataSnap Client/Server Delphi 2009
I can't pass Blob Field through DataSnap Client/Server Delphi 2009, when I try to Open the TSqlServerMethod this says Remote Error: unexpected metadata type, but, that only when the Table or Query have Blob fields. > {quote:title=ALEXANDER DAVID CRUZ MARQUEZ wrote:}{quote} > I can't pass Blob Field through DataSnap Client/Server Delphi 2009, when I try to Open the TSqlServerMethod this says Remote Error: unexpected metadata type, but, that only when the Table or Query have Blob fields. Hi. I have exactly the same problem. Seems it's not a just an error but it's a D...

Using Delphi Rest Client Library in IW application
Hello! I need to authenticate against REST server in IW application. I successfully did this job in VCL application using the following code {code} procedure TForm1.GetAccessToken; var AuthForm: Tfrm_OAuthWebForm; begin AuthForm := Tfrm_OAuthWebForm.Create(nil); try AuthForm.OnAfterRedirect := AuthAfterRedirectToken; OAuth2Authenticator1.ResponseType := TOAuth2ResponseType.rtToken; AuthForm.ShowModalWithURL(OAuth2Authenticator1.AuthorizationRequestURI); finally AuthForm.Free; end; end; {code} How to do it in IW? There is not enough informatio...

Web resources about - Reading a TDataset from a REST server in a Delphi Client - embarcadero.delphi.multi-tier

Embarcadero Delphi - Wikipedia, the free encyclopedia
Delphi was originally developed by Borland as a rapid application development tool for Windows, and as the successor of Borland Pascal . Delphi ...

Embarcadero Webinars
Advanced software tools for application developers and database professionals. Cross-platform solutions for database design, development and ...

FireMonkey Q&A
Questions and answers from a FireMonkey webinar

A simple Delphi wrapper for Sqlite 3
Most applications use a database, and there are many excellent database engines to choose from, both free and commercial. SQLite is a smal

Free Pascal - Future Plans
Home News Download Wiki Community Documentation Bug tracker free pascal Open source compiler for Pascal and Object Pascal General Home News Download ...

Delphi (programming language) - Wikipedia, the free encyclopedia
Delphi's compilers use their own Object Pascal dialect of Pascal and generate native code for several platforms: 32- and 64-bit Windows , 32-bit ...

Resources last updated: 1/6/2016 4:43:18 AM