Delphi .NET (2) Database (71) Delphi IDE (89) Network (39) Printing (3) Strings (12) VCL (83) Windows with Delphi (280)
Exchange Links About this site Links to us 
|
Stored procedures in a multi-tier environment
This article has not been rated yet. After reading, feel free to leave comments and rate it.
Question:
How do I use stored procedures in a multi-tier environment?
Answer:
You'll need to get the provider interface and set the parameters before trying to open the client dataset. Unfortunately there is no way to do this at design time, but it should work OK at run time.
Here is some code that shows basically what you need to do:
 | |  | |
procedure TDBClientTest.Button3Click(Sender: TObject);
var
Params: Variant;
begin
ClientData.Provider := RemoteServer1.GetProvider('ProviderName');
Params := VarArrayCreate([0, 1], varVariant);
Params[0] := VarArrayOf(['@InParam1', 101]);
Params[1] := VarArrayOf(['@InParam2', 'test_param']);
ClientData.Provider.SetParams(Params);
ClientData.Open;
end; | |  | |  | You don't like the formatting? Check out SourceCoder then!
Comments:
|
|
|
|
How I can get avoid from 'Too Many Passwords' bde error in delphi?
|
|