From 3e247c6a253a96977ff0f8b6f3906c7157e01657 Mon Sep 17 00:00:00 2001 From: v-kaywon Date: Tue, 17 Oct 2017 15:30:27 -0700 Subject: [PATCH] detect appveyor problem --- source/shared/core_stmt.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/source/shared/core_stmt.cpp b/source/shared/core_stmt.cpp index 982a64b4..285764b1 100644 --- a/source/shared/core_stmt.cpp +++ b/source/shared/core_stmt.cpp @@ -384,7 +384,14 @@ void core_sqlsrv_bind_param( _Inout_ sqlsrv_stmt* stmt, _In_ SQLUSMALLINT param_ if( zval_was_null || zval_was_bool ) { convert_to_long( param_z ); } - match = Z_TYPE_P( param_z ) == IS_LONG; + if( zval_was_long ){ + convert_to_string( param_z ); + encoding = SQLSRV_ENCODING_SYSTEM; + match = Z_TYPE_P( param_z ) == IS_STRING; + } + else { + match = Z_TYPE_P(param_z) == IS_LONG; + } break; case SQLSRV_PHPTYPE_FLOAT: if( zval_was_null ) {