Bad behavior introduced by SDAC 8.0.3

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
brace
Posts: 213
Joined: Wed 14 Feb 2007 08:26

Bad behavior introduced by SDAC 8.0.3

Post by brace » Thu 02 Nov 2017 09:47

After upgrading from SDAC 8.0.2 to 8.0.3 i noticed a bad behavior on TMSQuery.ApplyUpdates

one field is not updated, while with 8.0.2 it was correctly updated.

The field is a nchar(1) field where I store either "Y" or "N" to save a boolean value.

I tried to understand why so i checked what is strange in my query.

In fact the query is "bad" because it i s:

Code: Select all

select  UT.*,  AT.ISACTIVE as ANOTHER_TABLE_ISACTIVE, bla bla bla
from  USERS_TABLE UT JOIN ANOTHER_TABLE AT ON bla bla
so in fact the query uses ".*" that is a bad practice.

I realized that replacing "*" with all fields it works also with 8.0.3.

So in fact this works also with 8.0.3:

Code: Select all

select  UT.NAME, UT.ISACTIVE, UT.otherfields,  AT.ISACTIVE as ANOTHER_TABLE_ISACTIVE, bla bla bla
from  USERS_TABLE UT JOIN ANOTHER_TABLE AT ON bla bla
maybe the issue on SDAC 8.0.3 is that 2 tables contain the ISACTIVE field and one of those is retrieved by "*".

But this is a workaround for a single query.

Another information i can give you is that setting debug true i have this on ApplyUpdates:

Code: Select all

UPDATE USERS_TABLE 
SET
  DESIGN_REPORT = ?, CAN_LOGIN = ?
WHERE
  ID_USER = ?


:DESIGN_REPORT(FixedWideChar[1],IN)='Y' 
:CAN_LOGIN(WideString[1],IN)='Y' 
:Old_ID_USER(Integer,IN)=168 
I see 2 problems here:
A) ISACTIVE is not shown (in fact it is not updated)
B) I see ":Old_ID_USER(Integer,IN)=168 " - no clue of what this is

Since i have more queries where i use .* i am non confident to use 8.0.3.

Please let me know if this tells you something.

I am quite worried and i hoep you can identify and fix this.

Stellar
Devart Team
Posts: 122
Joined: Tue 03 Oct 2017 11:00

Re: Bad behavior introduced by SDAC 8.0.3

Post by Stellar » Fri 03 Nov 2017 15:34

In order for us to give you a concrete answer to your questions, send us a small sample demonstrating the issue, as well as a script to create tables.

brace
Posts: 213
Joined: Wed 14 Feb 2007 08:26

Re: Bad behavior introduced by SDAC 8.0.3

Post by brace » Tue 07 Nov 2017 09:43

Hello.

I just sent you by email a sample to reproduce the issue.

I hope you can fix it.

Thanks.

Stellar
Devart Team
Posts: 122
Joined: Tue 03 Oct 2017 11:00

Re: Bad behavior introduced by SDAC 8.0.3

Post by Stellar » Tue 07 Nov 2017 12:51

Thank you for the information. We have fixed the issue, and the fix will be included in the next SDAC build.

brace
Posts: 213
Joined: Wed 14 Feb 2007 08:26

Re: Bad behavior introduced by SDAC 8.0.3

Post by brace » Tue 07 Nov 2017 13:37

I am glad you were able to reproduce and fix it. Thanks!

Post Reply