Re: DB2 version without connection DB2SQL wrote:
> The bigger problem with this API (db2DbDirGetNextEntry - Get Next
> Database Directory Entry) is that you have to provide a versionNumber
> (Input Specifies the version and release level of the structure passed
> in as the second parameter pParmStruct) as first parameter. Imagine
> that, in order to obtain a dbtype (Database manager release
> information) you have to provide a versionNumber (Input Specifies the
> version and release level of the structure passed in as the second
> parameter pParmStruct). Congratulation to DB2 API designers. You are
> great.
I think you have a big misunderstanding here. The manual reads very
specific: the "versionNumber" attribute is the "version and release level
of _the structure passed_ in as the second parameter pParmStruct".
I would also congratulate the API designers because they took into account
that the structure itself might change or might need to be enhanced in
future releases. With the requirement that you provide the version
information about the structure (not the database manager or databases),
DB2 will know what kind of information you did provide and will know what
to do.
> Please give me a value and I will design an API that is going
> to return that value.
No, the API says: Please give me a structure and tell me how this structure
looks like. If it is the structure we defined for V82, then I (DB2) know
how to handle it. If it is a structure of V10, then I know it is different
than V82 and I know how to handle that. In both cases, I can give you the
directory entries you want and we both know the "protocol" we are using.
--
Knut Stolze
Information Integration
IBM Germany / University of Jena |