The Vertica Forum recently got a makeover! Let us know what you think by filling out this short, anonymous survey.

How to get table columns info using ODBC? (SQLColumns returns an error)

rm_rm_
edited September 18 in General Discussion

I am trying to retrieve table columns info using a call to ODBC SQLColumnsW. This part of code works well with all other ODBC sources (Impala, MS SQL Server, etc)
The call looks like:
SQLRETURN ret = SQLColumnsW(stmt, catalogName, catalogNameLength, schemaName,
schemaNameLength, tableName, tableNameLength, NULL, 0 );
Driver (version 9.2.1.2, Windows) returns the error:
HY009:11376: [Vertica][ODBC] (11376) Invalid use of NULL pointer for column name.

Best Answer

Answers

  • Thank you, I set it to SQL_FALSE and it works now with Vertica (probably SQL Server just ignores this flag and allows NULL).

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.