| View previous topic :: View next topic |
| Author |
Message |
Joe Bain Guest
|
Posted: Wed Jan 18, 2006 8:53 pm Post subject: Re: Parameter Passing between ClientDataSet and DataSetProvi |
|
|
Geoff Marshall wrote:
| Quote: | I hope this is a much easier question to answer.
In my ClientDataSet I establish three parameters before opening it.
In the AfterOpen event I observe the parameters are correct.
The DataSetProvider is connected to a TIBDataSet. Both before and
after it is opened I observe the parameters to be NULL.
1. What am I forgetting to do that will cause the parameters to be
sent?
2. I note the help for the clientDataSet specifies that parameters
are only sent the first time the component is opened, and that
subsequently I should use the Execute method. Having tried that I
get an error "Execute not supported". Is the help file correct?
When I do get the parameters passed will they go each time?
Geoff Marshall
|
Answer 1.
On the server setup the TIBDataset like you want with the param in the
SQL. On the client set the the ProviderName of the CDS and right click
it and choose "Fetch Params". At run time the code looks like this.
cds.Params.ParamByName('FOO').value := 'Bar';
cds.open;
Answer 2.
To change the parameters, just close the cds, changes the params, and
open it. The execute method is only used if the provider does not
return a result set (ie an insert of delete query).
--------------
Joe Bain
www.iegsoftware.com
|
|
| Back to top |
|
 |
Geoff Marshall Guest
|
Posted: Thu Jan 19, 2006 3:20 am Post subject: Parameter Passing between ClientDataSet and DataSetProvider |
|
|
I hope this is a much easier question to answer.
In my ClientDataSet I establish three parameters before opening it.
In the AfterOpen event I observe the parameters are correct.
The DataSetProvider is connected to a TIBDataSet. Both before and after
it is opened I observe the parameters to be NULL.
1. What am I forgetting to do that will cause the parameters to be sent?
2. I note the help for the clientDataSet specifies that parameters are
only sent the first time the component is opened, and that subsequently
I should use the Execute method. Having tried that I get an error
"Execute not supported". Is the help file correct? When I do get the
parameters passed will they go each time?
Geoff Marshall
|
|
| Back to top |
|
 |
Geoff Marshall Guest
|
Posted: Sun Jan 22, 2006 11:30 pm Post subject: Re: Parameter Passing between ClientDataSet and DataSetProvi |
|
|
Joe Bain wrote:
| Quote: | Geoff Marshall wrote:
I hope this is a much easier question to answer.
In my ClientDataSet I establish three parameters before opening it.
In the AfterOpen event I observe the parameters are correct.
The DataSetProvider is connected to a TIBDataSet. Both before and
after it is opened I observe the parameters to be NULL.
1. What am I forgetting to do that will cause the parameters to be
sent?
2. I note the help for the clientDataSet specifies that parameters
are only sent the first time the component is opened, and that
subsequently I should use the Execute method. Having tried that I
get an error "Execute not supported". Is the help file correct?
When I do get the parameters passed will they go each time?
Geoff Marshall
|
Joe, Thanks for your comment that's what I was doing but...
| Quote: |
Answer 1.
On the server setup the TIBDataset like you want with the param in the
SQL. On the client set the the ProviderName of the CDS and right click
it and choose "Fetch Params".
|
.... Nothing happens. No parameters. No nothing. Frustrated I am.
|
|
| Back to top |
|
 |
Joe Bain Guest
|
Posted: Mon Jan 23, 2006 1:53 pm Post subject: Re: Parameter Passing between ClientDataSet and DataSetProvi |
|
|
Geoff Marshall wrote:
| Quote: | .... Nothing happens. No parameters. No nothing. Frustrated I
am.
|
I have never used a TIBDataset of the server side, I always use
TIBQuery. Try it with that. I have never had fetch params not work. Do
you override AS_GetParams on the server?
--
--------------
Joe Bain
www.iegsoftware.com
|
|
| Back to top |
|
 |
Mark Horrocks Guest
|
Posted: Mon Jan 23, 2006 11:34 pm Post subject: Re: Parameter Passing between ClientDataSet and DataSetProvi |
|
|
I may be wrong here but you can't use paramters with TIBDataset. I use
TIBDataset for inserts only and TIBQuery for all else. You can read the
params with TIBQuery.
|
|
| Back to top |
|
 |
Joe Bain Guest
|
Posted: Tue Jan 24, 2006 1:26 pm Post subject: Re: Parameter Passing between ClientDataSet and DataSetProvi |
|
|
Mark Horrocks wrote:
| Quote: | I may be wrong here but you can't use paramters with TIBDataset. I
use TIBDataset for inserts only and TIBQuery for all else. You can
read the params with TIBQuery.
|
TIBDataset is a TIBQuery with a TIBUpdateSQL built in. You can access
the select params just like you would a TIBQuery. I am wondering if
IProviderSupport is not implemented properly in it.
Geoff, what version of Delphi and IBX are you using?
--
--------------
Joe Bain
www.iegsoftware.com
|
|
| Back to top |
|
 |
|