[unixODBC-dev] SQLInstallerError confusion

Igor Korot ikorot at earthlink.net
Sat Aug 23 00:28:08 BST 2008


Hi,
MSDN says in regards to SQLInstallerError:

[Quote]
Arguments:
  iError
     [Input] Error record number. Valid numbers are from 1 to 8
[/Quote]

However in the file odbcinst/SQLInstallerError.c there are following lines:

[Code]
if ( nError != 1 || pnErrorCode == NULL || pszErrorMsg == NULL )
	return SQL_NO_DATA;
[/Code]

nError variable is a first parameter (i.e. iError).
Which means that unixODBC accepts only "1" as iError.

The biffest question here is that MSDN does NOT say when the parameter
should be 1 and when - 8. But since it is used only for SQLConfigDataSource,
my guess is that it somehow related to the config function second parameter -
whether we working with user or system DSN, and what operation is performed.

Probably, since it was not available at the time of this code was written
it is written thhis way.

I will try to talk to either M$ or someone who is familiar with this stuff
over at CodeGuru/CodeProject to figure out what parameter belongs where.

Please confirm my suspicion about lack of documentation or otherwise
why the code accepts only "1".

Thank you.



More information about the unixODBC-dev mailing list