@@ -3156,7 +3156,7 @@ PHP_FUNCTION(odbc_tables)
3156
3156
type , SAFE_SQL_NTS (type ));
3157
3157
3158
3158
if (rc == SQL_ERROR ) {
3159
- odbc_sql_error (conn , SQL_NULL_HSTMT , "SQLTables" );
3159
+ odbc_sql_error (conn , result -> stmt , "SQLTables" );
3160
3160
efree (result );
3161
3161
RETURN_FALSE ;
3162
3162
}
@@ -3227,7 +3227,7 @@ PHP_FUNCTION(odbc_columns)
3227
3227
column , (SQLSMALLINT ) column_len );
3228
3228
3229
3229
if (rc == SQL_ERROR ) {
3230
- odbc_sql_error (conn , SQL_NULL_HSTMT , "SQLColumns" );
3230
+ odbc_sql_error (conn , result -> stmt , "SQLColumns" );
3231
3231
efree (result );
3232
3232
RETURN_FALSE ;
3233
3233
}
@@ -3292,7 +3292,7 @@ PHP_FUNCTION(odbc_columnprivileges)
3292
3292
column , SAFE_SQL_NTS (column ));
3293
3293
3294
3294
if (rc == SQL_ERROR ) {
3295
- odbc_sql_error (conn , SQL_NULL_HSTMT , "SQLColumnPrivileges" );
3295
+ odbc_sql_error (conn , result -> stmt , "SQLColumnPrivileges" );
3296
3296
efree (result );
3297
3297
RETURN_FALSE ;
3298
3298
}
@@ -3372,7 +3372,7 @@ PHP_FUNCTION(odbc_foreignkeys)
3372
3372
ftable , SAFE_SQL_NTS (ftable ) );
3373
3373
3374
3374
if (rc == SQL_ERROR ) {
3375
- odbc_sql_error (conn , SQL_NULL_HSTMT , "SQLForeignKeys" );
3375
+ odbc_sql_error (conn , result -> stmt , "SQLForeignKeys" );
3376
3376
efree (result );
3377
3377
RETURN_FALSE ;
3378
3378
}
@@ -3434,7 +3434,7 @@ PHP_FUNCTION(odbc_gettypeinfo)
3434
3434
rc = SQLGetTypeInfo (result -> stmt , data_type );
3435
3435
3436
3436
if (rc == SQL_ERROR ) {
3437
- odbc_sql_error (conn , SQL_NULL_HSTMT , "SQLGetTypeInfo" );
3437
+ odbc_sql_error (conn , result -> stmt , "SQLGetTypeInfo" );
3438
3438
efree (result );
3439
3439
RETURN_FALSE ;
3440
3440
}
@@ -3496,7 +3496,7 @@ PHP_FUNCTION(odbc_primarykeys)
3496
3496
table , SAFE_SQL_NTS (table ) );
3497
3497
3498
3498
if (rc == SQL_ERROR ) {
3499
- odbc_sql_error (conn , SQL_NULL_HSTMT , "SQLPrimaryKeys" );
3499
+ odbc_sql_error (conn , result -> stmt , "SQLPrimaryKeys" );
3500
3500
efree (result );
3501
3501
RETURN_FALSE ;
3502
3502
}
@@ -3565,7 +3565,7 @@ PHP_FUNCTION(odbc_procedurecolumns)
3565
3565
col , SAFE_SQL_NTS (col ) );
3566
3566
3567
3567
if (rc == SQL_ERROR ) {
3568
- odbc_sql_error (conn , SQL_NULL_HSTMT , "SQLProcedureColumns" );
3568
+ odbc_sql_error (conn , result -> stmt , "SQLProcedureColumns" );
3569
3569
efree (result );
3570
3570
RETURN_FALSE ;
3571
3571
}
@@ -3633,7 +3633,7 @@ PHP_FUNCTION(odbc_procedures)
3633
3633
proc , SAFE_SQL_NTS (proc ) );
3634
3634
3635
3635
if (rc == SQL_ERROR ) {
3636
- odbc_sql_error (conn , SQL_NULL_HSTMT , "SQLProcedures" );
3636
+ odbc_sql_error (conn , result -> stmt , "SQLProcedures" );
3637
3637
efree (result );
3638
3638
RETURN_FALSE ;
3639
3639
}
@@ -3706,7 +3706,7 @@ PHP_FUNCTION(odbc_specialcolumns)
3706
3706
nullable );
3707
3707
3708
3708
if (rc == SQL_ERROR ) {
3709
- odbc_sql_error (conn , SQL_NULL_HSTMT , "SQLSpecialColumns" );
3709
+ odbc_sql_error (conn , result -> stmt , "SQLSpecialColumns" );
3710
3710
efree (result );
3711
3711
RETURN_FALSE ;
3712
3712
}
@@ -3776,7 +3776,7 @@ PHP_FUNCTION(odbc_statistics)
3776
3776
reserved );
3777
3777
3778
3778
if (rc == SQL_ERROR ) {
3779
- odbc_sql_error (conn , SQL_NULL_HSTMT , "SQLStatistics" );
3779
+ odbc_sql_error (conn , result -> stmt , "SQLStatistics" );
3780
3780
efree (result );
3781
3781
RETURN_FALSE ;
3782
3782
}
@@ -3839,7 +3839,7 @@ PHP_FUNCTION(odbc_tableprivileges)
3839
3839
table , SAFE_SQL_NTS (table ));
3840
3840
3841
3841
if (rc == SQL_ERROR ) {
3842
- odbc_sql_error (conn , SQL_NULL_HSTMT , "SQLTablePrivileges" );
3842
+ odbc_sql_error (conn , result -> stmt , "SQLTablePrivileges" );
3843
3843
efree (result );
3844
3844
RETURN_FALSE ;
3845
3845
}
0 commit comments