Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Database/DataSnap/Server    [ Add a report in this area ]  
Report #:  92819   Status: Need Feedback
DSProxy generator export wrong (all) methods
Project:  Delphi Build #:  15.0.3953.35171
Version:    15.1 Submitted By:   Vall Kill
Report Type:  Basic functionality failure Date Reported:  4/4/2011 1:08:24 AM
Severity:    Serious / Highly visible problem Last Updated: 4/7/2011 3:40:08 AM
Platform:    All platforms Internal Tracking #:  
Resolution: Need More Info (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Description
After watching a demo on how to create server methods with custom object (class) result
http://www.youtube.com/watch?v=yWP2ZkVRx08

I have decided to use this approach in my DSServer
My definition:
type TTest=class(tobject)
public
  property OB:array[1..10] of double;
......
......
End;


but after declaring a public method
functon Get:TTest;

on a generated proxy at the client side appear all the local methods of the servermethods data module like:
procedure TServerMethods1.DSServerModuleCreate(Sender: TObject);
procedure TServerMethods1.DSServerModuleDestroy(Sender: TObject); etc.

After that the client side can not be compiled until i manualy remove this declaration :
procedure TServerMethods1Client.DSServerModuleDestroy(Sender: TObject);
begin
  if FDSServerModuleDestroyCommand = nil then
  begin
    FDSServerModuleDestroyCommand := FDBXConnection.CreateCommand;
    FDSServerModuleDestroyCommand.CommandType := TDBXCommandTypes.DSServerMethod;
    FDSServerModuleDestroyCommand.Text := 'TServerMethods1.DSServerModuleDestroy';
    FDSServerModuleDestroyCommand.Prepare;
  end;
  FDSServerModuleDestroyCommand.Parameters[0].Value.{UnknownType(37)} := Sender;
  FDSServerModuleDestroyCommand.ExecuteUpdate;
end;
Steps to Reproduce:
None
Workarounds
None
Attachment
DataSnapGroup.zip
Comments

Tomohiro Takahashi at 4/5/2011 6:42:28 AM -
Could you please attach sample projects(server/client) to confirm/reproduce your issue?

> After that the client side can not be compiled until i manualy remove this declaration :
Why can the client not be compiled? Do you get any compile error? So, please write more detail about the failure.

Bob Swart at 4/6/2011 6:12:45 AM -
An example project can be found at http://www.maranatha-consulting.com/Delphi/DataSnapGroup.zip

Tomohiro Takahashi at 4/7/2011 3:44:19 AM -
Thanks, I attached the .zip as Sysop.

> After that the client side can not be compiled until i manualy remove this declaration :
I tried to reproduce this issue with the attached client project. But I do not get any error even if generate proxy unit.
Could you tell us more detailed [Steps] to confirm your issue?

Server Response from: ETNACODE01