Page 1 of 1

TCustomMSDataSet provides wrong field value to parameter

Posted: Tue 10 Mar 2020 16:38
by Nilss
Hi,

we recently updated from SDAC 8.0.4 to 9.1.2 and now found a situation where the provided value from a field in a TCustomMSDataSet to a parameter of an insert statement changed.

The TCustomMSDataSet in question is a TMSStoredProc with a select statement that is similar to this abstracted example:

Code: Select all

SELECT
     t3.Value AS [V]
    ,t.Value AS [V_Compare_]
FROM dbo.Table t
OUTER APPLY
(
    SELECT
         t.V AS V
    UNION ALL 
    SELECT 
         t2.V
    FROM dbo.Table_2 t2
) t3
We assigned statement for insert using a stored procedure call, so no generated SQL, with a parameter "V". It used to get the value assigned from the name matching "V" field in the dataset, but since the update it gets the value of "V_Compare_". I've investigated and realized that this is caused by a change to TDADataSetUpdate.FieldByParamName, added inner function FindFieldByParamName, which will now find another field based on meta data.

Is this working as intended? Is there any way around this additional matching behavior to basically get back the behavior prior to the upgrade?

Re: TCustomMSDataSet provides wrong field value to parameter

Posted: Thu 12 Mar 2020 09:57
by Stellar
Thank you for the information. We fixed a similar issue earlier, and the fix was included in SDAC 9.1.3. Please check whether the issue occurs in the SDAC 9.1.3. If it does, please send us a small example demonstrating the issue. You can send it through the contact form on our website: devart.com/company/contactform.html
The new version 9.1.3 of SDAC is already available for download.

Re: TCustomMSDataSet provides wrong field value to parameter

Posted: Thu 12 Mar 2020 17:04
by Nilss
Thank you for the reply. I checked with version 9.1.3 and the issue is gone indeed!

Re: TCustomMSDataSet provides wrong field value to parameter

Posted: Fri 13 Mar 2020 07:06
by Stellar
Glad to see that the issue was resolved.
Feel free to contact us if you have any further questions about our products.