You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a table with a 'bit' type column with a default value. Query the
INFORMATION_SCHEMA using PHP/PDO sqlsrv driver. In SQL Server 2005, the
Column_Default column is not returned by fetchAll(). In SQL Server 2008, for
the _ exact _ same configuration and _ exact _ same database (backed up and
restored to SQL Server 2008 on the same machine), the Column_Default is
returned properly.
create table test (
bit_column bit default 1,
varchar_column varchar(10)
);
Here's the SQL (from Yii framework / CMSSqlSchema.findColumns )
SELECT *, columnproperty(object_id(table_schema+'.'+table_name), column_name,
'IsIdentity') as IsIdentity
FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='Test' AND
TABLE_SCHEMA='dbo';
Prepare() and execute(). Then $result=$statement->fetchAll(PDO::FETCH_ASSOC)
in SQL Server 2005, the $return array will not contain any Column_Default
values
in SQL Server 2008, the $return array will contain a Column_Default value for
bit_column with value 1
Environment:
Windows XP SP3 + all hotfixes
Apache 2.2.11
PHP 5.2.9-1
php_pdo_sqlsrv_52_ts_vc6.dll version 2.0.1802.200
SQL Server 2005 (and) SQL Server 2008 R2
Work Item Details
Original CodePlex Issue:Issue 19567 Status: Closed Reason Closed: Unassigned Assigned to: Unassigned Reported on: Jan 5, 2011 at 6:28 AM Reported by: jeremydunn Updated on: Nov 2, 2011 at 11:09 PM Updated by: jguerin Closed on: Nov 2, 2011 at 11:09 PM
The text was updated successfully, but these errors were encountered:
This issue is being manifested by the SQL Server Engine, and not the driver. Given this issue is fixed in a following version of SQL Server, I feel that we can close this issue as 'fixed'.
Create a table with a 'bit' type column with a default value. Query the
INFORMATION_SCHEMA using PHP/PDO sqlsrv driver. In SQL Server 2005, the
Column_Default column is not returned by fetchAll(). In SQL Server 2008, for
the _ exact _ same configuration and _ exact _ same database (backed up and
restored to SQL Server 2008 on the same machine), the Column_Default is
returned properly.
create table test (
bit_column bit default 1,
varchar_column varchar(10)
);
Here's the SQL (from Yii framework / CMSSqlSchema.findColumns )
SELECT *, columnproperty(object_id(table_schema+'.'+table_name), column_name,
'IsIdentity') as IsIdentity
FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='Test' AND
TABLE_SCHEMA='dbo';
Prepare() and execute(). Then $result=$statement->fetchAll(PDO::FETCH_ASSOC)
in SQL Server 2005, the $return array will not contain any Column_Default
values
in SQL Server 2008, the $return array will contain a Column_Default value for
bit_column with value 1
Environment:
Windows XP SP3 + all hotfixes
Apache 2.2.11
PHP 5.2.9-1
php_pdo_sqlsrv_52_ts_vc6.dll version 2.0.1802.200
SQL Server 2005 (and) SQL Server 2008 R2
Work Item Details
Original CodePlex Issue: Issue 19567
Status: Closed
Reason Closed: Unassigned
Assigned to: Unassigned
Reported on: Jan 5, 2011 at 6:28 AM
Reported by: jeremydunn
Updated on: Nov 2, 2011 at 11:09 PM
Updated by: jguerin
Closed on: Nov 2, 2011 at 11:09 PM
The text was updated successfully, but these errors were encountered: