TDBFieldGetValueAsInteger in TDBAccess 2.0

This forum contains all information about TDBAccess library for NHL 2004 roster access and general NHL coding questions.

Moderator: Owen

Post Reply
FRA
Posts: 3
Joined: Wed Sep 08, 2004 6:27 pm

TDBFieldGetValueAsInteger in TDBAccess 2.0

Post by FRA » Tue Sep 21, 2004 6:25 pm

Hi,

There is a small illogical thing about TDBFieldGetValueAsInteger. The reference (.chm) says "It returns 0 if there was an error". But this function can also return 0 because the value itself of the integer IS 0. So we cannot really check this error code.
We could have another parameter to get the error code or the integer.

FRA.

Artem
Site Admin
Posts: 1166
Joined: Thu Oct 23, 2003 5:30 pm

Post by Artem » Wed Sep 22, 2004 12:06 am

Yeah, I knew it wouldn't be indicative of an error when I designed tdbaccess. However, the most logical value it can return in case of an error is 0. It has to return something.

BTW, although I made all functions non-void, I think you don't have to check errors after every call. It would become a COM programming if you had to :)

Post Reply