views:

209

answers:

3

Hi,

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?

+2  A: 

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.

Bruce McGee
Your solutions sounds work but I unable to make it works. Here is what I did:1. I rename DSProxyGen.exe to DSProxyGen.exe.old in folder "C:\Program Files (x86)\Embarcadero\RAD Studio\7.0\bin"2. I then try to generate the proxy client class from TSQLConnection context menu and it still able to generate the unit.It seems like the IDE didn't invoke DSProxyGen.exe
Chau Chee Yang
Interesting. I'm not sure what else to try.
Bruce McGee
Did you try it yourself?
Chau Chee Yang
I tried running the exe to see if the command line parameters were documented, but didn't try replacing it. I'll give it a shot when I get a little time.
Bruce McGee
A: 

See the unit DSProxyDesigner.dcu (for which the source file is not included, but should be at database\external\src\pas\datasnap\proxy\DSProxyDesigner.pas). This is the unit used at design-time to generate the proxy client classes. I'm not sure DSProxyGen.exe is actually used, and it's a shame there is no documentation on its command-line parameters, yet...

Bob Swart
+2  A: 

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...

Bob Swart
+1 for the true hacker attitude
jachguate