[unixODBC-dev] API differences sql.h unixODBC vs. MS

Eric Sharkey sharkey at netrics.com
Mon Dec 20 18:37:15 GMT 2004


> >For example, from MS's SQL.H I have:
> >
> >SQLRETURN  SQL_API SQLBindCol(SQLHSTMT StatementHandle,
> >                   SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
> >                   SQLPOINTER TargetValue, SQLINTEGER BufferLength,
> >                   SQLINTEGER *StrLen_or_Ind);
> >
> >and unixODBC defines:
> >
> >SQLRETURN  SQL_API SQLBindCol(SQLHSTMT StatementHandle,
> >                   SQLUSMALLINT ColumnNumber, SQLSMALLINT TargetType,
> >                   SQLPOINTER TargetValue, SQLLEN BufferLength,
> >                   SQLLEN *StrLen_or_Ind);
>
> I think you may be using a old version of the MS headers, unixODBC was 
> changed to match the newer MS headers, where SQLLEN is used as you have 
> found.

I'm currently running on Windows 2000 Server and MS Visual Studio 6.0
with all updates applied (as of a month ago, or there abouts).
This is "old"?

BTW, the current API reference on the MSDN site lists neither of those
two.  It has one SQLLEN and one SQLINTEGER.

SQLRETURN SQLBindCol(SQLHSTMT     StatementHandle,
          SQLUSMALLINT     ColumnNumber,
          SQLSMALLINT     TargetType,
          SQLPOINTER     TargetValuePtr,
          SQLINTEGER     BufferLength,
          SQLLEN *     StrLen_or_Ind);

Eric



More information about the unixODBC-dev mailing list