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