Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to manually invoke DSProxyGEN.EXE to generate Delphi DataSnap proxy client?

I am using DataSnap of Delphi 2010. There is a DSProxyGen.EXE utility to allow us generate proxy client unit. Does anyone how to consume this utility in command line to generate the proxy client without using TSQLConnection's context menu?

like image 352
Chau Chee Yang Avatar asked Nov 17 '25 19:11

Chau Chee Yang


2 Answers

DSProxyGen doesn't give you its parameters when run at the command line and doesn't respond to

DSProxyGen /?

You could try replacing it with your own exe (make a backup!) that detects what command line parameters are sent (global CmdLine variable) and write them to a file. Launch this from TSQLConnection's context menu and you should have what you need to call DSProxyGen from the command line.

Update:

From Delphi XE to XE7, source code for DSProxyGen is included as one of the samples

Samples\Delphi\DataSnap\ProxyGenerator

In Delphi XE8, it is shipped as part of the source code.

source\data\datasnap\proxygen
like image 151
Bruce McGee Avatar answered Nov 20 '25 19:11

Bruce McGee


DSProxyGen.exe without arguments connects using TCP/IP port 211 and uses the first command-line argument as filename.

DSProxyGen test.pas

Will generate test.pas

I've found no way to specify ConnectionString options on the command-line, yet...

like image 24
Bob Swart Avatar answered Nov 20 '25 19:11

Bob Swart