| View previous topic :: View next topic |
| Author |
Message |
Mark Horrocks Guest
|
Posted: Wed Apr 11, 2007 6:43 am Post subject: D7 to D2007 OnGetTableName |
|
|
I have the trial version D2007 and loaded a complex app server with remote
data module and child RDMs.
Many of the dataset providers use the onGetTablename event to resolve the
table name on updating joined queries.
While this has compiled fine for years in D7, D2007 complains that this
event has an incompatible parameter list and wants to remove the event
reference. If I allow this the event OnGetTableName becomes blank. If I then
try to replace the event I get an error Property and Method
DatasetProviderXXXGetTableName are incompatible. What is happening here?
Mark Horrocks |
|
| Back to top |
|
 |
Mark Horrocks Guest
|
Posted: Wed Apr 11, 2007 6:48 am Post subject: Re: D7 to D2007 OnGetTableName |
|
|
Additionally, when I loaded this project (the dpr), it loaded with an access
violation error for each of the child RDMs. Then D2007 upgraded my project
adding a bdsproj file. If I save this and close / reload the project it
loads without the access violation errors. Is this normal or has it removed
something I need?
Mark Horrocks |
|
| Back to top |
|
 |
Marc Rohloff [TeamB] Guest
|
Posted: Wed Apr 11, 2007 8:18 pm Post subject: Re: D7 to D2007 OnGetTableName |
|
|
On Wed, 11 Apr 2007 09:43:23 +0800, Mark Horrocks wrote:
| Quote: | While this has compiled fine for years in D7, D2007 complains that this
event has an incompatible parameter list and wants to remove the event
reference. If I allow this the event OnGetTableName becomes blank. If I then
try to replace the event I get an error Property and Method
DatasetProviderXXXGetTableName are incompatible. What is happening here?
|
I would suggest you find out what parameters D2007 expects for the
OnGetTableName event. This should give you a clue about what is
happening.
--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com |
|
| Back to top |
|
 |
Andrew Guest
|
Posted: Thu Apr 12, 2007 8:13 am Post subject: Re: D7 to D2007 OnGetTableName |
|
|
"Mark Horrocks" <markhorrocks_at_yahoo_dot_com> wrote in message news:461c3d38$1 (AT) newsgroups (DOT) borland.com...
| Quote: | I have the trial version D2007 and loaded a complex app server with remote
data module and child RDMs.
Many of the dataset providers use the onGetTablename event to resolve the
table name on updating joined queries.
While this has compiled fine for years in D7, D2007 complains that this
event has an incompatible parameter list and wants to remove the event
reference. If I allow this the event OnGetTableName becomes blank. If I then
try to replace the event I get an error Property and Method
DatasetProviderXXXGetTableName are incompatible. What is happening here?
Mark Horrocks
Mark, |
It removes the reference, but the method still remains in your code. When you try to replace the event, it finds the "old" method still there with the incorrect parameter list and throws the error. Just rename the old method, replace the event with a blank template and copy the old code across.
Cheers,
Andrew |
|
| Back to top |
|
 |
Mark Horrocks Guest
|
Posted: Thu Apr 12, 2007 1:51 pm Post subject: Re: D7 to D2007 OnGetTableName |
|
|
| Quote: | It removes the reference, but the method still remains in your code. When
you try to replace >>the event, it finds the "old" method still there with
the incorrect parameter list and throws the >>error. Just rename the old
method, replace the event with a blank template and copy the old >>code
across.
|
I deleted the code and then tried to replace the method but it still threw
the error. There are no *parameters* for OnGetTableName. The code simply
goes
inherited;
TableName = 'CUSTOMERS';
For some reason it doesn't like this.
Mark Horrocks
www.sportdata.com.au
www.heleneintimates.biz |
|
| Back to top |
|
 |
Andrew Guest
|
Posted: Fri Apr 13, 2007 8:13 am Post subject: Re: D7 to D2007 OnGetTableName |
|
|
"Mark Horrocks" <markhorrocks_at_yahoo_dot_com> wrote in message news:461df312 (AT) newsgroups (DOT) borland.com...
| Quote: |
It removes the reference, but the method still remains in your code. When
you try to replace >>the event, it finds the "old" method still there with
the incorrect parameter list and throws the >>error. Just rename the old
method, replace the event with a blank template and copy the old >>code
across.
I deleted the code and then tried to replace the method but it still threw
the error. There are no *parameters* for OnGetTableName. The code simply
goes
inherited;
TableName = 'CUSTOMERS';
For some reason it doesn't like this.
Mark Horrocks
www.sportdata.com.au
www.heleneintimates.biz
Mark, |
When I try it, there are three method parameters in D2007:
DataSetProvider1GetTableName(Sender: TObject; DataSet:TDataSet; var TableName: WideString);
Is the error when you try to generate the method placeholder (double-click in Object Inspector) or on trying to compile? If it's on trying to compile, I'd suspect the "inherited" call - I'm not actually sure what it's there for anyway as event handlers are normally not virtual. Remove the "inherited;" and see what happens.
HTH
Andrew |
|
| Back to top |
|
 |
Marc Rohloff [TeamB] Guest
|
Posted: Fri Apr 13, 2007 6:36 pm Post subject: Re: D7 to D2007 OnGetTableName |
|
|
On Fri, 13 Apr 2007 16:32:56 +1000, Andrew wrote:
| Quote: | When I try it, there are three method parameters in D2007:
DataSetProvider1GetTableName(Sender: TObject; DataSet:TDataSet; var TableName: WideString);
|
And what were the parameters in the Delphi 7 version?
--
Marc Rohloff [TeamB]
marc -at- marc rohloff -dot- com |
|
| Back to top |
|
 |
|