@@ -66,7 +66,7 @@ SQLRETURN EsSQLTablesW(
66
66
if (NameLength1 == SQL_NTS ) {
67
67
cnt_cat = wcslen (catalog );
68
68
if (ESODBC_MAX_IDENTIFIER_LEN < cnt_cat ) {
69
- ERRSTMT (stmt , "catalog identifier name '" LTPDL "' too long "
69
+ ERRH (stmt , "catalog identifier name '" LTPDL "' too long "
70
70
"(%d. max=%d)." , cnt_cat , catalog , cnt_cat ,
71
71
ESODBC_MAX_IDENTIFIER_LEN );
72
72
RET_HDIAG (stmt , SQL_STATE_HY090 , "catalog name too long" , 0 );
@@ -84,7 +84,7 @@ SQLRETURN EsSQLTablesW(
84
84
if (NameLength2 == SQL_NTS ) {
85
85
cnt_sch = wcslen (schema );
86
86
if (ESODBC_MAX_IDENTIFIER_LEN < cnt_sch ) {
87
- ERRSTMT (stmt , "schema identifier name '" LTPDL "' too long "
87
+ ERRH (stmt , "schema identifier name '" LTPDL "' too long "
88
88
"(%d. max=%d)." , cnt_sch , schema , cnt_sch ,
89
89
ESODBC_MAX_IDENTIFIER_LEN );
90
90
RET_HDIAG (stmt , SQL_STATE_HY090 , "schema name too long" , 0 );
@@ -100,7 +100,7 @@ SQLRETURN EsSQLTablesW(
100
100
/* TODO: server support needed for sch. name filtering */
101
101
if (cnt_sch && wszmemcmp (schema , MK_WPTR (SQL_ALL_SCHEMAS ),
102
102
(long )cnt_sch )) {
103
- ERR ( "filtering by schemas is not supported." );
103
+ ERRH ( stmt , "filtering by schemas is not supported." );
104
104
RET_HDIAG (stmt , SQL_STATE_IM001 , "schema filtering not supported" , 0 );
105
105
}
106
106
@@ -110,7 +110,7 @@ SQLRETURN EsSQLTablesW(
110
110
if (NameLength3 == SQL_NTS ) {
111
111
cnt_tab = wcslen (table );
112
112
if (ESODBC_MAX_IDENTIFIER_LEN < cnt_tab ) {
113
- ERRSTMT (stmt , "table identifier name '" LTPDL "' too long "
113
+ ERRH (stmt , "table identifier name '" LTPDL "' too long "
114
114
"(%d. max=%d)." , cnt_tab , table , cnt_tab ,
115
115
ESODBC_MAX_IDENTIFIER_LEN );
116
116
RET_HDIAG (stmt , SQL_STATE_HY090 , "table name too long" , 0 );
@@ -133,7 +133,7 @@ SQLRETURN EsSQLTablesW(
133
133
pos = swprintf (wbuf , sizeof (wbuf )/sizeof (wbuf [0 ]), SQL_TABLES ,
134
134
(int )cnt_cat , catalog , (int )cnt_tab , table );
135
135
if (pos <= 0 ) {
136
- ERRSTMT (stmt , "failed to print 'tables' catalog SQL." );
136
+ ERRH (stmt , "failed to print 'tables' catalog SQL." );
137
137
RET_HDIAGS (stmt , SQL_STATE_HY000 );
138
138
}
139
139
@@ -175,7 +175,7 @@ SQLRETURN EsSQLColumnsW
175
175
if (cchCatalogName == SQL_NTS ) {
176
176
cnt_cat = wcslen (catalog );
177
177
if (ESODBC_MAX_IDENTIFIER_LEN < cnt_cat ) {
178
- ERRSTMT (stmt , "catalog identifier name '" LTPDL "' too long "
178
+ ERRH (stmt , "catalog identifier name '" LTPDL "' too long "
179
179
"(%d. max=%d)." , cnt_cat , catalog , cnt_cat ,
180
180
ESODBC_MAX_IDENTIFIER_LEN );
181
181
RET_HDIAG (stmt , SQL_STATE_HY090 , "catalog name too long" , 0 );
@@ -192,7 +192,7 @@ SQLRETURN EsSQLColumnsW
192
192
if (cchSchemaName == SQL_NTS ) {
193
193
cnt_sch = wcslen (schema );
194
194
if (ESODBC_MAX_IDENTIFIER_LEN < cnt_sch ) {
195
- ERRSTMT (stmt , "schema identifier name '" LTPDL "' too long "
195
+ ERRH (stmt , "schema identifier name '" LTPDL "' too long "
196
196
"(%d. max=%d)." , cnt_sch , schema , cnt_sch ,
197
197
ESODBC_MAX_IDENTIFIER_LEN );
198
198
RET_HDIAG (stmt , SQL_STATE_HY090 , "schema name too long" , 0 );
@@ -208,7 +208,7 @@ SQLRETURN EsSQLColumnsW
208
208
/* TODO: server support needed for sch. name filtering */
209
209
if (cnt_sch && wszmemcmp (schema , MK_WPTR (SQL_ALL_SCHEMAS ),
210
210
(long )cnt_sch )) {
211
- ERR ( "filtering by schemas is not supported." );
211
+ ERRH ( stmt , "filtering by schemas is not supported." );
212
212
RET_HDIAG (stmt , SQL_STATE_IM001 , "schema filtering not supported" , 0 );
213
213
}
214
214
@@ -218,7 +218,7 @@ SQLRETURN EsSQLColumnsW
218
218
if (cchTableName == SQL_NTS ) {
219
219
cnt_tab = wcslen (table );
220
220
if (ESODBC_MAX_IDENTIFIER_LEN < cnt_tab ) {
221
- ERRSTMT (stmt , "table identifier name '" LTPDL "' too long "
221
+ ERRH (stmt , "table identifier name '" LTPDL "' too long "
222
222
"(%d. max=%d)." , cnt_tab , table , cnt_tab ,
223
223
ESODBC_MAX_IDENTIFIER_LEN );
224
224
RET_HDIAG (stmt , SQL_STATE_HY090 , "table name too long" , 0 );
@@ -236,7 +236,7 @@ SQLRETURN EsSQLColumnsW
236
236
if (cchColumnName == SQL_NTS ) {
237
237
cnt_col = wcslen (column );
238
238
if (ESODBC_MAX_IDENTIFIER_LEN < cnt_col ) {
239
- ERRSTMT (stmt , "column identifier name '" LTPDL "' too long "
239
+ ERRH (stmt , "column identifier name '" LTPDL "' too long "
240
240
"(%d. max=%d)." , cnt_col , column , cnt_col ,
241
241
ESODBC_MAX_IDENTIFIER_LEN );
242
242
RET_HDIAG (stmt , SQL_STATE_HY090 , "column name too long" , 0 );
@@ -260,7 +260,7 @@ SQLRETURN EsSQLColumnsW
260
260
(int )cnt_tab , table , (int )cnt_col , column );
261
261
}
262
262
if (pos <= 0 ) {
263
- ERRSTMT (stmt , "failed to print 'columns' catalog SQL." );
263
+ ERRH (stmt , "failed to print 'columns' catalog SQL." );
264
264
RET_HDIAGS (stmt , SQL_STATE_HY000 );
265
265
}
266
266
@@ -288,7 +288,7 @@ SQLRETURN EsSQLSpecialColumnsW
288
288
{
289
289
// TODO: is there a "rowid" equivalent: ID uniquely a ROW in the table?
290
290
// or unique indexes equivalents
291
- WARN ( "no special columns available." );
291
+ WARNH ( hstmt , "no special columns available." );
292
292
STMT_FORCE_NODATA (STMH (hstmt ));
293
293
return SQL_SUCCESS ;
294
294
}
@@ -309,7 +309,7 @@ SQLRETURN EsSQLForeignKeysW(
309
309
_In_reads_opt_ (cchFkTableName ) SQLWCHAR * szFkTableName ,
310
310
SQLSMALLINT cchFkTableName )
311
311
{
312
- WARN ( "no foreign keys supported." );
312
+ WARNH ( hstmt , "no foreign keys supported." );
313
313
STMT_FORCE_NODATA (STMH (hstmt ));
314
314
return SQL_SUCCESS ;
315
315
}
@@ -323,7 +323,7 @@ SQLRETURN SQL_API EsSQLPrimaryKeysW(
323
323
_In_reads_opt_ (cchTableName ) SQLWCHAR * szTableName ,
324
324
SQLSMALLINT cchTableName )
325
325
{
326
- WARN ( "no primary keys supported." );
326
+ WARNH ( hstmt , "no primary keys supported." );
327
327
STMT_FORCE_NODATA (STMH (hstmt ));
328
328
return SQL_SUCCESS ;
329
329
}
0 commit comments