Hi
(This is completely unrelated to my previous patches to sqldb and ibconnection.)
A simple correction that fixes a problem in IBConnection with field names: in TIBConnection.LoadField you look for field names using SQLDA^.SQLVar[x].AliasName, but in TIBConnection.AddFieldDefs you create fields with names using SQLDA^.SQLVar[x].SQLName. This is not good, as field's SQLName may be '' while it's AliasName may be 'COUNT' or something like that. In general, I think that you should use AliasNames everywhere. This also gives developer (the one who writes SQL statements) ability to change default field names using SQL (since you can explicitly say in select SQLs what AliasName should be used for some fields).
So the fix is (I don't attach a patch, since this is too small..): change in TIBConnection.AddFieldDefs implementation "SQLName" to "AliasName". This way in whole IBConnection unit only AliasName of fields is used, never SQLName.
Michalis.
_______________________________________________ fpc-devel maillist - [email protected] http://lists.freepascal.org/mailman/listinfo/fpc-devel
