We have found a mayor problem with 7.0.4. In some cases we are filling Grids in the follwing way (columns as bind variables):
Call SqlPrepareAndExecute( hSql, 'select x, y into :col1, :col2 from z' )
Call SalTblSetContext( hWndForm, SalTblInsertRow( hWndForm, TBL_MaxRow ) )
While SqlFetchNext( hSql, nDummy )
...Call SalTblSetContext( hWndForm, SalTblInsertRow( hWndForm, TBL_MaxRow ) )
Call SalTblDeleteRow( hWndForm, SalTblQueryContext( hWndForm ), TBL_MaxRow )
Logically after processing the While SqlFetchNext... we have to delete the last row because it is empty. Here is the regression:
With TD 7.0.3 and all previous versions after calling SalTblDeleteRow() the context row is "TBL_Error". This is the expected behaviour.
With TD 7.0.4 after calling SalTblDeleteRow() the context row is "row 0". This can cause some heavy unwanted effects.
I have attached a test case that shows the probem. Extract the .zip and run the .exe (not the .apt). With the cdlli70.dll (version 7.0.4) the context row is 0 (wrong). With the cdlli70.dll (version 7.0.3) the context row is TBL_Error (ok).
I will make a support case.
TD-23945, TD-24495: [TD704] wrong context row when calling SalTblDeleteRow() and SalGridApplyState()
TD-23945, TD-24495: [TD704] wrong context row when calling SalTblDeleteRow() and SalGridApplyState()
You do not have the required permissions to view the files attached to this post.
Best regards,
Uwe van der Horst
Advo-web GmbH
Uwe van der Horst
Advo-web GmbH
-
- Founder/Site Admin
- Posts: 2956
- Joined: 24 Feb 2017, 09:12
- Location: Gouda, The Netherlands
7.0.4: incorrect context row 0 after calling SalTblDeleteRow()
I can confirm this, Uwe.
Regards,
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
Dave Rabelink

Articles and information on Team Developer Tips & Tricks Wiki
Download samples, documents and resources from TD Sample Vault
Videos on TDWiki YouTube Channel
7.0.4: incorrect context row 0 after calling SalTblDeleteRow()
The bug number is TD-23945.
Best regards,
Uwe van der Horst
Advo-web GmbH
Uwe van der Horst
Advo-web GmbH
TD-23945 (regression 7.0.4): incorrect context row 0 after calling SalTblDeleteRow()
This bug is fixed in TD 7.05 and 7.1.
Best regards,
Uwe van der Horst
Advo-web GmbH
Uwe van der Horst
Advo-web GmbH
Re: TD-23945 (regression 7.0.4), new: TD-24495: wrong context row when calling SalTblDeleteRow() and SalGridApplyState()
The issue is partially back in 7.1.2 (not checked with 7.1.1). When filling the grid from outside the behaviour is different from filling the grid from inside of the grid.
no problems here:
On SAM_CreateComplete
... fFillGrid()
Here when calling SalGridApplyState() the grid might be sorted, but row 0 has the context.
different behaviour:
Call SalCreateWindow( grid1, hWndMDI)
Call grid1.fFillGrid()
Here when calling SalGridApplyState() the grid might be sorted and then we have a row somewhere in the middle of the grid that has the context (= "row 0" BEFORE calling SalGridApplyState).
Maybe customer does not notice and marks multiple rows by holding ctrl. Then we have one more line selected. Think about attached documents with secret information that customer sends to a person via E-Mail...
The new number is TD-24495, fix is requested for the 7.1.3 release.
no problems here:
On SAM_CreateComplete
... fFillGrid()
Here when calling SalGridApplyState() the grid might be sorted, but row 0 has the context.
different behaviour:
Call SalCreateWindow( grid1, hWndMDI)
Call grid1.fFillGrid()
Here when calling SalGridApplyState() the grid might be sorted and then we have a row somewhere in the middle of the grid that has the context (= "row 0" BEFORE calling SalGridApplyState).
Maybe customer does not notice and marks multiple rows by holding ctrl. Then we have one more line selected. Think about attached documents with secret information that customer sends to a person via E-Mail...
The new number is TD-24495, fix is requested for the 7.1.3 release.
You do not have the required permissions to view the files attached to this post.
Best regards,
Uwe van der Horst
Advo-web GmbH
Uwe van der Horst
Advo-web GmbH
Re: TD-23945 (regression 7.0.4), new: TD-24495: wrong context row when calling SalTblDeleteRow() and SalGridApplyState()
This is fixed in TD 7.1.3 and 7.2 Beta.
Best regards,
Uwe van der Horst
Advo-web GmbH
Uwe van der Horst
Advo-web GmbH
Who is online
Users browsing this forum: [Ccbot] and 0 guests