Thread: SQLTables and szTableRemarks field?
Hi, I am using unixODBC driver 2.2.12 on Mac OSX 10.5.2 or Windows XP and the pgODBC driver 08.03.0400. When reading out tables with SQLTables I did not get the remarks field. Why is this happen or is it unimplemented? I bind the columns as follows: SQLBindCol(hstmt, 1, SQL_C_CHAR, szTableCatalog, TAB_LEN, &cbTableCatalog); SQLBindCol(hstmt, 2, SQL_C_CHAR, szTableSchema, TAB_LEN, &cbTableSchema); SQLBindCol(hstmt, 3, SQL_C_CHAR, szTableName, TAB_LEN, &cbTableName); SQLBindCol(hstmt, 4, SQL_C_CHAR, szTableType, TAB_LEN, &cbTableType); SQLBindCol(hstmt, 5, SQL_C_CHAR, szTableRemarks, REM_LEN, &cbTableRemarks); And use either retcode = SQLTables(hstmt, NULL, 0, (unsigned char*) schema, strlen(schema), NULL, 0, NULL, 0); or retcode = SQLTables(hstmt, NULL, 0, NULL, 0, NULL, 0, NULL, 0); Any ideas? Thanks Lothar -- | Rapid Prototyping | XSLT Codegeneration | http://www.lollisoft.de Lothar Behrens Heinrich-Scheufelen-Platz 2 73252 Lenningen
,--- You/Lothar (Mon, 6 Jul 2009 00:37:31 +0200) ----* | When reading out tables with SQLTables I did not get the remarks field. | | Why is this happen or is it unimplemented? Per the documentation available online, it is not. | I bind the columns as follows: | | SQLBindCol(hstmt, 1, SQL_C_CHAR, szTableCatalog, TAB_LEN, | &cbTableCatalog); | SQLBindCol(hstmt, 2, SQL_C_CHAR, szTableSchema, TAB_LEN, | &cbTableSchema); | SQLBindCol(hstmt, 3, SQL_C_CHAR, szTableName, TAB_LEN, &cbTableName); | SQLBindCol(hstmt, 4, SQL_C_CHAR, szTableType, TAB_LEN, &cbTableType); | SQLBindCol(hstmt, 5, SQL_C_CHAR, szTableRemarks, REM_LEN, | &cbTableRemarks); The fifth column of the `information_schema.tables' table is called, in fact, `self_referencing_column_name', and "applies to a feature not available in PostgreSQL". -- Alex -- alex-goncharov@comcast.net --
Hi, thanks. But now I had a look at the pg_catalog assuming the comments must be there anywhere. I found it in pg_description. Would it useful if the comment is retrieved from that table? How much work would it be (I am not familar with the odbc driver code it self, but I think there it is best) to implement that? Thanks Lothar Am 06.07.2009 um 02:06 schrieb Alex Goncharov: > ,--- You/Lothar (Mon, 6 Jul 2009 00:37:31 +0200) ----* > | When reading out tables with SQLTables I did not get the remarks > field. > | > | Why is this happen or is it unimplemented? > > Per the documentation available online, it is not. > > | I bind the columns as follows: > | > | SQLBindCol(hstmt, 1, SQL_C_CHAR, szTableCatalog, TAB_LEN, > | &cbTableCatalog); > | SQLBindCol(hstmt, 2, SQL_C_CHAR, szTableSchema, TAB_LEN, > | &cbTableSchema); > | SQLBindCol(hstmt, 3, SQL_C_CHAR, szTableName, TAB_LEN, > &cbTableName); > | SQLBindCol(hstmt, 4, SQL_C_CHAR, szTableType, TAB_LEN, > &cbTableType); > | SQLBindCol(hstmt, 5, SQL_C_CHAR, szTableRemarks, REM_LEN, > | &cbTableRemarks); > > The fifth column of the `information_schema.tables' table is called, > in fact, `self_referencing_column_name', and "applies to a feature not > available in PostgreSQL". > > -- Alex -- alex-goncharov@comcast.net -- > -- | Rapid Prototyping | XSLT Codegeneration | http://www.lollisoft.de Lothar Behrens Heinrich-Scheufelen-Platz 2 73252 Lenningen