--TEST--
LOB types as strings.
--SKIPIF--
--FILE--
\n";
}
$v = sqlsrv_get_field($stmt, 1, SQLSRV_PHPTYPE_STRING(SQLSRV_ENC_CHAR));
if (!$v) {
print('Failed to get text field');
}
echo "$v
\n";
$v = sqlsrv_get_field($stmt, 2, SQLSRV_PHPTYPE_STRING(SQLSRV_ENC_CHAR));
if (!$v) {
die('Failed to get image field]');
}
echo "$v
\n";
$v = sqlsrv_get_field($stmt, 3, SQLSRV_PHPTYPE_STRING(SQLSRV_ENC_CHAR));
if (!$v) {
print('Failed to get ntext field');
}
echo "$v
\n";
$v = sqlsrv_get_field($stmt, 4, SQLSRV_PHPTYPE_STRING(SQLSRV_ENC_CHAR));
if (!$v) {
print('Failed to get varbinary(max) field');
}
echo "$v
\n";
$v = sqlsrv_get_field($stmt, 5, SQLSRV_PHPTYPE_STRING(SQLSRV_ENC_CHAR));
if (!$v) {
print('Failed to get varchar(max) field');
}
echo "$v
\n";
$v = sqlsrv_get_field($stmt, 6, SQLSRV_PHPTYPE_STRING(SQLSRV_ENC_CHAR));
if (!$v) {
print('Failed to get nvarchar(max) field');
}
echo "$v
\n";
sqlsrv_free_stmt($stmt);
sqlsrv_close($conn);
echo "Test successful."
?>
--EXPECT--
100
This is field 2.
010203
This is field 4.
040506
This is field 6.
This is field 7.
Test successful.