Bug #6388
save-where-string works without the buffer attached to a dataset
100%
History
#1 Updated by Constantin Asofiei about 4 years ago
This test shows that save-where-string works without the buffer attached to a dataset:
def temp-table tt1 field f1 as int.
def dataset ds1 for tt1.
def var dsrc1 as handle.
create data-source dsrc1.
dsrc1:add-source-buffer(buffer tt1:handle, "f1").
dsrc1:save-where-string("tt1") = "where tt1.book-id = 10".
message dsrc1:save-where-string("tt1").
dataset ds1:get-buffer-handle("tt1"):attach-data-source(dsrc1).
Currently I've disabled this test:
if (datasetBuffer == null)
{
ErrorManager.recordOrShowError(11892, buffers.get(0).doGetName());
// Attempt to reference dataset buffer of a data-source before ATTACH-DATA-SOURCE for data-source buffer <name>.
return new character();
}
in
DataSource setSaveWhereString and getSaveWhereString methods.
Ovidiu, is there a reason why this check was added? I can't duplicate it.
#3 Updated by Ovidiu Maxiniuc about 4 years ago
- File my-tests-save-fill-where-strings1.p
added
Probably the condition must be refined. See the attached procedure which shows the error. I am investigating additional elements which dictates whether the error is pertinent or not.
#4 Updated by Ovidiu Maxiniuc about 4 years ago
- % Done changed from 0 to 100
- Status changed from New to WIP
It seems that if the attribute is set manually, the error in getter is not thrown any more (removing the line no. 7 (the assignment) in your example will cause the error to be shown). I could not identify a testcase where the error is thrown in the case of the setter. It could be a deduction of mine (based on the text of the error), so I commented out the error in that case.
Committed as r13867 in 6129a.
#5 Updated by Constantin Asofiei about 4 years ago
- Status changed from WIP to Test