Page 1 of 1

Strange behavior of FieldByName.

Posted: Thu 17 Jul 2008 15:35
by forcom
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.

Posted: Fri 18 Jul 2008 05:52
by Antaeus
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.

Posted: Fri 18 Jul 2008 13:26
by forcom
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.