Hi,
We are using a SQL command looking like:
select *.rowid
Our components have the ResolveToDataSet=true
We open two instances of a same TForm using the same Provider on the MIDAS server.
Both forms display different data because the parameter for that "select" command is different, thus results are different.
Problem is that when we try to modify the record on the 1st Form, we get a "Record modified by another user" error message.
By investigating what's going on with SQLMonitor, when we try to "applyupdates" to the first Form, we notice that the server rexecutes the commands it did to load the dataset on a form, but its parameter's value is still the one from the 2nd Form, what is wrong! It should use the parameter value of the 1st Form, or not execute those commands again.
Here is what SQLMonitor returns when loading the records (before modifications):
1st record on 1st Form:
pID = 16
SELECT SECURITES.*, SECURITES.rowid
FROM SECURITES
WHERE IdSecurite =
ID
1st record on 2nd Form:
pID = 13
SELECT SECURITES.*, SECURITES.rowid
FROM SECURITES
WHERE IdSecurite =
ID
As you see, this is correct, the pID values are different between the two Forms.
Then we modify the record on Form1 and ApplyUpdates.
Here is what we get:
pID = 13
SELECT SECURITES.*, SECURITES.rowid
FROM SECURITES
WHERE IdSecurite =
ID
Session Rollback
As you can see, this is wrong, pID should be 16, not 13.
Any clue on this problem?
How can we avoid this? Is the error on our side? Is there anything we can do to work with the correct contextual pID? Is there any property that manages such things?
Thanks for any help.
Hoang
[This message has been edited by hoang (edited 16 January 2002).]
We are using a SQL command looking like:
select *.rowid
Our components have the ResolveToDataSet=true
We open two instances of a same TForm using the same Provider on the MIDAS server.
Both forms display different data because the parameter for that "select" command is different, thus results are different.
Problem is that when we try to modify the record on the 1st Form, we get a "Record modified by another user" error message.
By investigating what's going on with SQLMonitor, when we try to "applyupdates" to the first Form, we notice that the server rexecutes the commands it did to load the dataset on a form, but its parameter's value is still the one from the 2nd Form, what is wrong! It should use the parameter value of the 1st Form, or not execute those commands again.
Here is what SQLMonitor returns when loading the records (before modifications):
1st record on 1st Form:
pID = 16
SELECT SECURITES.*, SECURITES.rowid
FROM SECURITES
WHERE IdSecurite =

1st record on 2nd Form:
pID = 13
SELECT SECURITES.*, SECURITES.rowid
FROM SECURITES
WHERE IdSecurite =

As you see, this is correct, the pID values are different between the two Forms.
Then we modify the record on Form1 and ApplyUpdates.
Here is what we get:
pID = 13
SELECT SECURITES.*, SECURITES.rowid
FROM SECURITES
WHERE IdSecurite =

Session Rollback
As you can see, this is wrong, pID should be 16, not 13.
Any clue on this problem?
How can we avoid this? Is the error on our side? Is there anything we can do to work with the correct contextual pID? Is there any property that manages such things?
Thanks for any help.
Hoang
[This message has been edited by hoang (edited 16 January 2002).]