Strange behavior of FieldByName.

Discussion of open issues, suggestions and bugs regarding SDAC (SQL Server Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
forcom
Posts: 2
Joined: Thu 17 Jul 2008 15:16

Strange behavior of FieldByName.

Post by forcom » Thu 17 Jul 2008 15:35

Hi, we have problems with SDAC components ver. 4.35.1.16 using it with Borland 5. The problem exists only for one workstation. When simple query is executed with aliases for column names, for example:

select id roleId, name roleName from Role

we can refer to fields by they column name not aliases so code:

query->FieldByName( "roleId" )

will not work, but

query->FieldByName( "id" )

will work. Rest of the workstation works fine, that means that first line of code works good and second one not. The same binaries executed on other workstation works fine.

Antaeus
Posts: 2098
Joined: Tue 14 Feb 2006 10:14

Post by Antaeus » Fri 18 Jul 2008 05:52

Please check whether this problem is reproduced with the latest versions of SDAC.
If it is, specify the exact version of SQL Server and client on the computer where the problem appears.

forcom
Posts: 2
Joined: Thu 17 Jul 2008 15:16

Post by forcom » Fri 18 Jul 2008 13:26

After couple hours of work (i.a. trying newer version) we figured out that the error was introduced by sql server client. After replacing client all work fine. Thank you for your answer.

Post Reply