@@ -55,7 +55,7 @@ SQLRETURN EsSQLTablesW(
55
55
if (NameLength1 == SQL_NTS ) {
56
56
cnt_cat = wcslen (catalog );
57
57
if (ESODBC_MAX_IDENTIFIER_LEN < cnt_cat ) {
58
- ERRSTMT (stmt , "catalog identifier name '" LTPDL "' too long "
58
+ ERRH (stmt , "catalog identifier name '" LTPDL "' too long "
59
59
"(%d. max=%d)." , cnt_cat , catalog , cnt_cat ,
60
60
ESODBC_MAX_IDENTIFIER_LEN );
61
61
RET_HDIAG (stmt , SQL_STATE_HY090 , "catalog name too long" , 0 );
@@ -73,7 +73,7 @@ SQLRETURN EsSQLTablesW(
73
73
if (NameLength2 == SQL_NTS ) {
74
74
cnt_sch = wcslen (schema );
75
75
if (ESODBC_MAX_IDENTIFIER_LEN < cnt_sch ) {
76
- ERRSTMT (stmt , "schema identifier name '" LTPDL "' too long "
76
+ ERRH (stmt , "schema identifier name '" LTPDL "' too long "
77
77
"(%d. max=%d)." , cnt_sch , schema , cnt_sch ,
78
78
ESODBC_MAX_IDENTIFIER_LEN );
79
79
RET_HDIAG (stmt , SQL_STATE_HY090 , "schema name too long" , 0 );
@@ -89,7 +89,7 @@ SQLRETURN EsSQLTablesW(
89
89
/* TODO: server support needed for sch. name filtering */
90
90
if (cnt_sch && wszmemcmp (schema , MK_WPTR (SQL_ALL_SCHEMAS ),
91
91
(long )cnt_sch )) {
92
- ERR ( "filtering by schemas is not supported." );
92
+ ERRH ( stmt , "filtering by schemas is not supported." );
93
93
RET_HDIAG (stmt , SQL_STATE_IM001 , "schema filtering not supported" , 0 );
94
94
}
95
95
@@ -99,7 +99,7 @@ SQLRETURN EsSQLTablesW(
99
99
if (NameLength3 == SQL_NTS ) {
100
100
cnt_tab = wcslen (table );
101
101
if (ESODBC_MAX_IDENTIFIER_LEN < cnt_tab ) {
102
- ERRSTMT (stmt , "table identifier name '" LTPDL "' too long "
102
+ ERRH (stmt , "table identifier name '" LTPDL "' too long "
103
103
"(%d. max=%d)." , cnt_tab , table , cnt_tab ,
104
104
ESODBC_MAX_IDENTIFIER_LEN );
105
105
RET_HDIAG (stmt , SQL_STATE_HY090 , "table name too long" , 0 );
@@ -122,7 +122,7 @@ SQLRETURN EsSQLTablesW(
122
122
pos = swprintf (wbuf , sizeof (wbuf )/sizeof (wbuf [0 ]), SQL_TABLES ,
123
123
(int )cnt_cat , catalog , (int )cnt_tab , table );
124
124
if (pos <= 0 ) {
125
- ERRSTMT (stmt , "failed to print 'tables' catalog SQL." );
125
+ ERRH (stmt , "failed to print 'tables' catalog SQL." );
126
126
RET_HDIAGS (stmt , SQL_STATE_HY000 );
127
127
}
128
128
@@ -164,7 +164,7 @@ SQLRETURN EsSQLColumnsW
164
164
if (cchCatalogName == SQL_NTS ) {
165
165
cnt_cat = wcslen (catalog );
166
166
if (ESODBC_MAX_IDENTIFIER_LEN < cnt_cat ) {
167
- ERRSTMT (stmt , "catalog identifier name '" LTPDL "' too long "
167
+ ERRH (stmt , "catalog identifier name '" LTPDL "' too long "
168
168
"(%d. max=%d)." , cnt_cat , catalog , cnt_cat ,
169
169
ESODBC_MAX_IDENTIFIER_LEN );
170
170
RET_HDIAG (stmt , SQL_STATE_HY090 , "catalog name too long" , 0 );
@@ -181,7 +181,7 @@ SQLRETURN EsSQLColumnsW
181
181
if (cchSchemaName == SQL_NTS ) {
182
182
cnt_sch = wcslen (schema );
183
183
if (ESODBC_MAX_IDENTIFIER_LEN < cnt_sch ) {
184
- ERRSTMT (stmt , "schema identifier name '" LTPDL "' too long "
184
+ ERRH (stmt , "schema identifier name '" LTPDL "' too long "
185
185
"(%d. max=%d)." , cnt_sch , schema , cnt_sch ,
186
186
ESODBC_MAX_IDENTIFIER_LEN );
187
187
RET_HDIAG (stmt , SQL_STATE_HY090 , "schema name too long" , 0 );
@@ -197,7 +197,7 @@ SQLRETURN EsSQLColumnsW
197
197
/* TODO: server support needed for sch. name filtering */
198
198
if (cnt_sch && wszmemcmp (schema , MK_WPTR (SQL_ALL_SCHEMAS ),
199
199
(long )cnt_sch )) {
200
- ERR ( "filtering by schemas is not supported." );
200
+ ERRH ( stmt , "filtering by schemas is not supported." );
201
201
RET_HDIAG (stmt , SQL_STATE_IM001 , "schema filtering not supported" , 0 );
202
202
}
203
203
@@ -207,7 +207,7 @@ SQLRETURN EsSQLColumnsW
207
207
if (cchTableName == SQL_NTS ) {
208
208
cnt_tab = wcslen (table );
209
209
if (ESODBC_MAX_IDENTIFIER_LEN < cnt_tab ) {
210
- ERRSTMT (stmt , "table identifier name '" LTPDL "' too long "
210
+ ERRH (stmt , "table identifier name '" LTPDL "' too long "
211
211
"(%d. max=%d)." , cnt_tab , table , cnt_tab ,
212
212
ESODBC_MAX_IDENTIFIER_LEN );
213
213
RET_HDIAG (stmt , SQL_STATE_HY090 , "table name too long" , 0 );
@@ -225,7 +225,7 @@ SQLRETURN EsSQLColumnsW
225
225
if (cchColumnName == SQL_NTS ) {
226
226
cnt_col = wcslen (column );
227
227
if (ESODBC_MAX_IDENTIFIER_LEN < cnt_col ) {
228
- ERRSTMT (stmt , "column identifier name '" LTPDL "' too long "
228
+ ERRH (stmt , "column identifier name '" LTPDL "' too long "
229
229
"(%d. max=%d)." , cnt_col , column , cnt_col ,
230
230
ESODBC_MAX_IDENTIFIER_LEN );
231
231
RET_HDIAG (stmt , SQL_STATE_HY090 , "column name too long" , 0 );
@@ -249,7 +249,7 @@ SQLRETURN EsSQLColumnsW
249
249
(int )cnt_tab , table , (int )cnt_col , column );
250
250
}
251
251
if (pos <= 0 ) {
252
- ERRSTMT (stmt , "failed to print 'columns' catalog SQL." );
252
+ ERRH (stmt , "failed to print 'columns' catalog SQL." );
253
253
RET_HDIAGS (stmt , SQL_STATE_HY000 );
254
254
}
255
255
@@ -277,7 +277,7 @@ SQLRETURN EsSQLSpecialColumnsW
277
277
{
278
278
// TODO: is there a "rowid" equivalent: ID uniquely a ROW in the table?
279
279
// or unique indexes equivalents
280
- WARN ( "no special columns available." );
280
+ WARNH ( hstmt , "no special columns available." );
281
281
STMT_FORCE_NODATA (STMH (hstmt ));
282
282
return SQL_SUCCESS ;
283
283
}
@@ -298,7 +298,7 @@ SQLRETURN EsSQLForeignKeysW(
298
298
_In_reads_opt_ (cchFkTableName ) SQLWCHAR * szFkTableName ,
299
299
SQLSMALLINT cchFkTableName )
300
300
{
301
- WARN ( "no foreign keys supported." );
301
+ WARNH ( hstmt , "no foreign keys supported." );
302
302
STMT_FORCE_NODATA (STMH (hstmt ));
303
303
return SQL_SUCCESS ;
304
304
}
@@ -312,7 +312,7 @@ SQLRETURN SQL_API EsSQLPrimaryKeysW(
312
312
_In_reads_opt_ (cchTableName ) SQLWCHAR * szTableName ,
313
313
SQLSMALLINT cchTableName )
314
314
{
315
- WARN ( "no primary keys supported." );
315
+ WARNH ( hstmt , "no primary keys supported." );
316
316
STMT_FORCE_NODATA (STMH (hstmt ));
317
317
return SQL_SUCCESS ;
318
318
}
0 commit comments