// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files(the ""Software""),
// to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
// and / or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions :
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
// THE SOFTWARE IS PROVIDED *AS IS*, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
{IMSSP,(SQLCHAR*)"Invalid option %1!s! was passed to sqlsrv_connect.",-1,true}
},
// no equivalent to error 2 in 2.0
// error 3 is superceded by -16
// these two share the same code since they are basically the same error.
{
SQLSRV_ERROR_UID_PWD_BRACES_NOT_ESCAPED,
{IMSSP,(SQLCHAR*)"An unescaped right brace (}) was found in either the user name or password. All right braces must be"
" escaped with another right brace (}}).",-4,false}
},
{
SS_SQLSRV_ERROR_CONNECT_BRACES_NOT_ESCAPED,
{IMSSP,(SQLCHAR*)"An unescaped right brace (}) was found in option %1!s!.",-4,true}
},
{
SQLSRV_ERROR_NO_DATA,
{IMSSP,(SQLCHAR*)"Field %1!d! returned no data.",-5,true}
},
{
SQLSRV_ERROR_STREAMABLE_TYPES_ONLY,
{IMSSP,(SQLCHAR*)"Only char, nchar, varchar, nvarchar, binary, varbinary, and large object types can be read by using "
"streams.",-6,false}
},
{
SS_SQLSRV_ERROR_INVALID_OUTPUT_PARAM_TYPE,
{IMSSP,(SQLCHAR*)"An invalid PHP type was specified as an output parameter. DateTime objects, NULL values, and streams cannot be "
"specified as output parameters.",-7,false}
},
{
SS_SQLSRV_ERROR_INVALID_CONNECTION_KEY,
{IMSSP,(SQLCHAR*)"An invalid connection option key type was received. Option key types must be strings.",-8,false}
},
{
SS_SQLSRV_ERROR_VAR_REQUIRED,
{IMSSP,(SQLCHAR*)"Parameter array %1!d! must have at least one value or variable.",-9,true}
},
{
SS_SQLSRV_ERROR_INVALID_FETCH_TYPE,
{IMSSP,(SQLCHAR*)"An invalid fetch type was specified. SQLSRV_FETCH_NUMERIC, SQLSRV_FETCH_ARRAY and SQLSRV_FETCH_BOTH are acceptable values.",-10,false}
},
{
SQLSRV_ERROR_STATEMENT_NOT_EXECUTED,
{IMSSP,(SQLCHAR*)"The statement must be executed before results can be retrieved.",-11,false}
},
{
SS_SQLSRV_ERROR_ALREADY_IN_TXN,
{IMSSP,(SQLCHAR*)"Cannot begin a transaction until the current transaction has been completed by calling either "
"sqlsrv_commit or sqlsrv_rollback.",-12,false}
},
{
SS_SQLSRV_ERROR_NOT_IN_TXN,
{IMSSP,(SQLCHAR*)"A transaction must be started by calling sqlsrv_begin_transaction before calling sqlsrv_commit or "
"sqlsrv_rollback.",-13,false}
},
{
SS_SQLSRV_ERROR_INVALID_FUNCTION_PARAMETER,
{IMSSP,(SQLCHAR*)"An invalid parameter was passed to %1!s!.",-14,true}
},
{
SS_SQLSRV_ERROR_INVALID_PARAMETER_DIRECTION,
{IMSSP,(SQLCHAR*)"An invalid direction for parameter %1!d! was specified. SQLSRV_PARAM_IN, SQLSRV_PARAM_OUT, and "
"SQLSRV_PARAM_INOUT are valid values.",-15,true}
},
{
SQLSRV_ERROR_INVALID_PARAMETER_PHPTYPE,
{IMSSP,(SQLCHAR*)"An invalid PHP type for parameter %1!d! was specified.",-16,true}
},
{
SQLSRV_ERROR_INVALID_PARAMETER_SQLTYPE,
{IMSSP,(SQLCHAR*)"An invalid SQL Server type for parameter %1!d! was specified.",-17,true}
},
{
SQLSRV_ERROR_FETCH_NOT_CALLED,
{IMSSP,(SQLCHAR*)"A row must be retrieved with sqlsrv_fetch before retrieving data with sqlsrv_get_field.",-18,false}
},
{
SQLSRV_ERROR_FIELD_INDEX_ERROR,
{IMSSP,(SQLCHAR*)"Fields within a row must be accessed in ascending order. "
"The sqlsrv_get_field function cannot retrieve field %1!d! because its index is less "
"than the index of a field that has already been retrieved (%2!d!).",-19,true}
},
{
SQLSRV_ERROR_DATETIME_CONVERSION_FAILED,
{IMSSP,(SQLCHAR*)"The retrieval of the DateTime object failed.",-20,false}
},
// no equivalent to SQLSRV_ERROR_SERVER_INFO in 2.0 so -21 is skipped
{
SQLSRV_ERROR_FETCH_PAST_END,
{IMSSP,(SQLCHAR*)"There are no more rows in the active result set. Since this result set is not scrollable, no more "
"data may be retrieved.",-22,false}
},
{
SS_SQLSRV_ERROR_STATEMENT_NOT_PREPARED,
{IMSSP,(SQLCHAR*)"A statement must be prepared with sqlsrv_prepare before calling sqlsrv_execute.",-23,false}
},
{
SQLSRV_ERROR_ZEND_HASH,
{IMSSP,(SQLCHAR*)"An error occurred while creating or accessing a Zend hash table.",-24,false}
},
{
SQLSRV_ERROR_ZEND_STREAM,
{IMSSP,(SQLCHAR*)"An error occurred while reading from a PHP stream.",-25,false}
},
{
SQLSRV_ERROR_NEXT_RESULT_PAST_END,
{IMSSP,(SQLCHAR*)"There are no more results returned by the query.",-26,false}
},
{
SQLSRV_ERROR_STREAM_CREATE,
{IMSSP,(SQLCHAR*)"An error occurred while retrieving a SQL Server field as a stream.",-27,false}
},
{
SQLSRV_ERROR_NO_FIELDS,
{IMSSP,(SQLCHAR*)"The active result for the query contains no fields.",-28,false}
},
{
SS_SQLSRV_ERROR_ZEND_BAD_CLASS,
{IMSSP,(SQLCHAR*)"Failed to find class %1!s!.",-29,true}
},
{
SS_SQLSRV_ERROR_ZEND_OBJECT_FAILED,
{IMSSP,(SQLCHAR*)"Failed to create an instance of class %1!s!.",-30,true}
},
{
SS_SQLSRV_ERROR_INVALID_PARAMETER_PRECISION,
{IMSSP,(SQLCHAR*)"An invalid size or precision for parameter %1!d! was specified.",-31,true}
},
{
SQLSRV_ERROR_INVALID_OPTION_KEY,
{IMSSP,(SQLCHAR*)"Option %1!s! is invalid.",-32,true}
},
// these three errors are returned for invalid options, so they are given the same number for compatibility with 1.1
{
SQLSRV_ERROR_INVALID_QUERY_TIMEOUT_VALUE,
{IMSSP,(SQLCHAR*)"Invalid value %1!s! specified for option SQLSRV_QUERY_TIMEOUT.",-33,true}
},
{
SQLSRV_ERROR_INVALID_OPTION_TYPE_INT,
{IMSSP,(SQLCHAR*)"Invalid value type for option %1!s! was specified. Integer type was expected.",-33,true}
},
{
SQLSRV_ERROR_INVALID_OPTION_TYPE_STRING,
{IMSSP,(SQLCHAR*)"Invalid value type for option %1!s! was specified. String type was expected.",-33,true}
},
{
SQLSRV_ERROR_INPUT_OUTPUT_PARAM_TYPE_MATCH,
{IMSSP,(SQLCHAR*)"The type of output parameter %1!d! does not match the type specified by the SQLSRV_PHPTYPE_* constant."
" For output parameters, the type of the variable's current value must match the SQLSRV_PHPTYPE_* constant, or be NULL. "
"If the type is NULL, the PHP type of the output parameter is inferred from the SQLSRV_SQLTYPE_* constant.",-34,true}
},
{
SQLSRV_ERROR_INVALID_TYPE,
{IMSSP,(SQLCHAR*)"Invalid type",-35,false}
},
// 36-38 have no equivalent 2.0 errors
{
SS_SQLSRV_ERROR_REGISTER_RESOURCE,
{IMSSP,(SQLCHAR*)"Registering the %1!s! resource failed.",-39,true}
},
{
SQLSRV_ERROR_INPUT_PARAM_ENCODING_TRANSLATE,
{IMSSP,(SQLCHAR*)"An error occurred translating string for input param %1!d! to UCS-2: %2!s!",-40,true}
},
{
SQLSRV_ERROR_OUTPUT_PARAM_ENCODING_TRANSLATE,
{IMSSP,(SQLCHAR*)"An error occurred translating string for an output param to UTF-8: %1!s!",-41,true}
},
{
SQLSRV_ERROR_FIELD_ENCODING_TRANSLATE,
{IMSSP,(SQLCHAR*)"An error occurred translating string for a field to UTF-8: %1!s!",-42,true}
},
{
SQLSRV_ERROR_INPUT_STREAM_ENCODING_TRANSLATE,
{IMSSP,(SQLCHAR*)"An error occurred translating a PHP stream from UTF-8 to UTF-16: %1!s!",-43,true}
},
{
SQLSRV_ERROR_MARS_OFF,
{IMSSP,(SQLCHAR*)"The connection cannot process this operation because there is a statement with pending results. "
"To make the connection available for other queries, either fetch all results or cancel or free the statement. "
"For more information, see the product documentation about the MultipleActiveResultSets connection option.",-44,false}
},
{
SQLSRV_ERROR_CONN_OPTS_WRONG_TYPE,
{IMSSP,(SQLCHAR*)"Expected an array of options for the connection. Connection options must be passed as an array of "
"key/value pairs.",-45,false}
},
{
SQLSRV_ERROR_QUERY_STRING_ENCODING_TRANSLATE,
{IMSSP,(SQLCHAR*)"An error occurred translating the query string to UTF-16: %1!s!.",-46,true}
},
{
SQLSRV_ERROR_CONNECT_STRING_ENCODING_TRANSLATE,
{IMSSP,(SQLCHAR*)"An error occurred translating the connection string to UTF-16: %1!s!",-47,true}
},
{
SS_SQLSRV_ERROR_CONNECT_ILLEGAL_ENCODING,
{IMSSP,(SQLCHAR*)"The encoding '%1!s!' is not a supported encoding for the CharacterSet connection option.",-48,true}
{IMSSP,(SQLCHAR*)"Variable parameter %1!d! not passed by reference (prefaced with an &). "
"Output or bidirectional variable parameters (SQLSRV_PARAM_OUT and SQLSRV_PARAM_INOUT) passed to sqlsrv_prepare or sqlsrv_query should be passed by reference, not by value."
{IMSSP,(SQLCHAR*)"Must specify the SQL type for each parameter in a parameterized query when using sqlsrv_query in a column encryption enabled connection.",-63,false}