php-windows Digest 10 Oct 2006 20:45:23 -0000 Issue 3053

Topics (messages 27217 through 27221):

Re: SPAM-LOW:  [PHP-WIN] Unicode data w/ PDO DBLIB, MSSQL
        27217 by: Aspen Olmsted
        27218 by: Mike Matz
        27219 by: Frank M. Kromann
        27220 by: Aspen Olmsted

Re: VAGRA
        27221 by: Alecto Casimir

Administrivia:

To subscribe to the digest, e-mail:
        [EMAIL PROTECTED]

To unsubscribe from the digest, e-mail:
        [EMAIL PROTECTED]

To post to the list, e-mail:
        [email protected]


----------------------------------------------------------------------
--- Begin Message ---
                I think I have reported the problem you are having with the 
odbc and pdo and sql server under bug 38834.
http://bugs.php.net/bug.php?id=38834

It should up to me with large columns of text but my guess is the same.

As a temporary solution I am using adodb with sql server but there is a bug 
with time zones which I have a modified version of adbdb if you want it.

Aspen Olmsted
Alliance Software Corporation
17 Pitt St
Charleston SC, 29401
[EMAIL PROTECTED]

----------------------------------------

                                From: "Mike Matz" <[EMAIL PROTECTED]>
Sent: Monday, October 09, 2006 12:48 PM
To: [email protected]
Subject: SPAM-LOW: [PHP-WIN] Unicode data w/ PDO DBLIB, MSSQL 

Is there currently any way to retrieve Unicode data from SQL Server?
I'm working with SQL Server Express 2005, on a database that's been
restored from an old SQL Server 2000 database. I'm writing a PHP script
that imports data from the MSSQL database, processes it, and adds it to
a MySQL database with a different schema. So far I've been unable to do
this reliably, as there is a lot of multilingual, Unicode data in the
MSSQL database. I'm trying to use the PDO method of database access,
but could fall back on another method if this is impossible. I'm able
to connect to my database using either ODBC or DBLIB MSSQL drivers.
When using DBLIB, I get an error:

$db = new PDO('mssql:host=\\\\.\pipe\sql\query;dbname=my_db', $user,
$pass);
$sth = $db->execute("SELECT * FROM Products");
$sth->execute();
print_r($sth->fetchAll());

gives me this exception:

Fatal error: Uncaught exception 'PDOException' with message
'SQLSTATE[HY000]: General error: 10007 Unicode data in a Unicode-only
collation or ntext data cannot be sent to clients using DB-Library (such
as ISQL) or ODBC version 3.7 or earlier. [10007] (severity 5) [(null)]'

When using ODBC, I get very strange results. There are no errors or
exceptions, but in every row, all columns following the first
text/unicode column will be empty. For example, if I SELECT Product_ID,
Short_Description, Product_Season (Short_Description being TEXT,
possibly with unicode), Product_Season will be empty. However, if I
SELECT Product_ID, Product_Season, Short_Description -- I'll get the
Product_Season. Short_Description is empty in both cases (even if it's
not empty when viewing with SQL Query Analyzer).

Has anyone seen this behavior or have any ideas as to what I should try?

Thanks,
Mike



--- End Message ---
--- Begin Message ---
Does ADOdb MSSQL driver solve this problem whereas the standard mssql_*
functions don't?  I thought ADOdb was just an abstraction layer, but
perhaps there are some different mechanisms or settings it uses that
resolve the issue I'm having?

________________________________

From: Aspen Olmsted [mailto:[EMAIL PROTECTED] 
Sent: Monday, October 09, 2006 12:55 PM
To: Mike Matz; [email protected]
Subject: re: SPAM-LOW: [PHP-WIN] Unicode data w/ PDO DBLIB, MSSQL


I think I have reported the problem you are having with the odbc and pdo
and sql server under bug 38834.
http://bugs.php.net/bug.php?id=38834

It should up to me with large columns of text but my guess is the same.

As a temporary solution I am using adodb with sql server but there is a
bug with time zones which I have a modified version of adbdb if you want
it.

Aspen Olmsted
Alliance Software Corporation
17 Pitt St
Charleston SC, 29401
[EMAIL PROTECTED]


________________________________

From: "Mike Matz" <[EMAIL PROTECTED]>
Sent: Monday, October 09, 2006 12:48 PM
To: [email protected]
Subject: SPAM-LOW: [PHP-WIN] Unicode data w/ PDO DBLIB, MSSQL 

Is there currently any way to retrieve Unicode data from SQL Server?
I'm working with SQL Server Express 2005, on a database that's been
restored from an old SQL Server 2000 database. I'm writing a PHP script
that imports data from the MSSQL database, processes it, and adds it to
a MySQL database with a different schema. So far I've been unable to do
this reliably, as there is a lot of multilingual, Unicode data in the
MSSQL database. I'm trying to use the PDO method of database access,
but could fall back on another method if this is impossible. I'm able
to connect to my database using either ODBC or DBLIB MSSQL drivers.
When using DBLIB, I get an error:

$db = new PDO('mssql:host=\\\\.\pipe\sql\query;dbname=my_db', $user,
$pass);
$sth = $db->execute("SELECT * FROM Products");
$sth->execute();
print_r($sth->fetchAll());

gives me this exception:

Fatal error: Uncaught exception 'PDOException' with message
'SQLSTATE[HY000]: General error: 10007 Unicode data in a Unicode-only
collation or ntext data cannot be sent to clients using DB-Library (such
as ISQL) or ODBC version 3.7 or earlier. [10007] (severity 5) [(null)]'

When using ODBC, I get very strange results. There are no errors or
exceptions, but in every row, all columns following the first
text/unicode column will be empty. For example, if I SELECT Product_ID,
Short_Description, Product_Season (Short_Description being TEXT,
possibly with unicode), Product_Season will be empty. However, if I
SELECT Product_ID, Product_Season, Short_Description -- I'll get the
Product_Season. Short_Description is empty in both cases (even if it's
not empty when viewing with SQL Query Analyzer).

Has anyone seen this behavior or have any ideas as to what I should try?

Thanks,
Mike




--- End Message ---
--- Begin Message ---
The mssql extension comes in two different versions on Win32 systems.

php_mssql.dll and php_pdo_mssql.dll are compiled and linked with ntwdblib
from Microsoft

php_dblib.dll and php_pdo_dblib.dll are compiled and linked with FreeTDS.

The FreeTDS versions uses a more recent version of the protocol and allows
handling of unicode data as well as removing the 255 char limit on char and
varchar columns.

- Frank

> Does ADOdb MSSQL driver solve this problem whereas the standard mssql_*
> functions don't?  I thought ADOdb was just an abstraction layer, but
> perhaps there are some different mechanisms or settings it uses that
> resolve the issue I'm having?
> 
> ________________________________
> 
> From: Aspen Olmsted [mailto:[EMAIL PROTECTED] 
> Sent: Monday, October 09, 2006 12:55 PM
> To: Mike Matz; [email protected]
> Subject: re: SPAM-LOW: [PHP-WIN] Unicode data w/ PDO DBLIB, MSSQL
> 
> 
> I think I have reported the problem you are having with the odbc and
pdo
> and sql server under bug 38834.
> http://bugs.php.net/bug.php?id=38834
> 
> It should up to me with large columns of text but my guess is the same.
> 
> As a temporary solution I am using adodb with sql server but there is a
> bug with time zones which I have a modified version of adbdb if you
want
> it.
> 
> Aspen Olmsted
> Alliance Software Corporation
> 17 Pitt St
> Charleston SC, 29401
> [EMAIL PROTECTED]
> 
> 
> ________________________________
> 
> From: "Mike Matz" <[EMAIL PROTECTED]>
> Sent: Monday, October 09, 2006 12:48 PM
> To: [email protected]
> Subject: SPAM-LOW: [PHP-WIN] Unicode data w/ PDO DBLIB, MSSQL 
> 
> Is there currently any way to retrieve Unicode data from SQL Server?
> I'm working with SQL Server Express 2005, on a database that's been
> restored from an old SQL Server 2000 database. I'm writing a PHP script
> that imports data from the MSSQL database, processes it, and adds it to
> a MySQL database with a different schema. So far I've been unable to do
> this reliably, as there is a lot of multilingual, Unicode data in the
> MSSQL database. I'm trying to use the PDO method of database access,
> but could fall back on another method if this is impossible. I'm able
> to connect to my database using either ODBC or DBLIB MSSQL drivers.
> When using DBLIB, I get an error:
> 
> $db = new PDO('mssql:host=\\\\.\pipe\sql\query;dbname=my_db', $user,
> $pass);
> $sth = $db->execute("SELECT * FROM Products");
> $sth->execute();
> print_r($sth->fetchAll());
> 
> gives me this exception:
> 
> Fatal error: Uncaught exception 'PDOException' with message
> 'SQLSTATE[HY000]: General error: 10007 Unicode data in a Unicode-only
> collation or ntext data cannot be sent to clients using DB-Library
(such
> as ISQL) or ODBC version 3.7 or earlier. [10007] (severity 5) [(null)]'
> 
> When using ODBC, I get very strange results. There are no errors or
> exceptions, but in every row, all columns following the first
> text/unicode column will be empty. For example, if I SELECT Product_ID,
> Short_Description, Product_Season (Short_Description being TEXT,
> possibly with unicode), Product_Season will be empty. However, if I
> SELECT Product_ID, Product_Season, Short_Description -- I'll get the
> Product_Season. Short_Description is empty in both cases (even if it's
> not empty when viewing with SQL Query Analyzer).
> 
> Has anyone seen this behavior or have any ideas as to what I should
try?
> 
> Thanks,
> Mike
> 
> 
> 
> 

--- End Message ---
--- Begin Message ---
                It is using ado instead of the old sql driver

----------------------------------------

                                From: "Mike Matz" <[EMAIL PROTECTED]>
Sent: Monday, October 09, 2006 3:07 PM
To: [EMAIL PROTECTED]>, <[email protected]
Subject: RE: SPAM-LOW: [PHP-WIN] Unicode data w/ PDO DBLIB, MSSQL 

                                                Does ADOdb MSSQL driver solve 
this problem whereas the standard mssql_* functions don't?  I thought ADOdb was 
just an abstraction layer, but perhaps there are some different mechanisms or 
settings it uses that resolve the issue I'm having? 

----------------------------------------

                                                From: Aspen Olmsted 
[mailto:[EMAIL PROTECTED] 
Sent: Monday, October 09, 2006 12:55 PM
To: Mike Matz; [email protected]
Subject: re: SPAM-LOW: [PHP-WIN] Unicode data w/ PDO DBLIB, MSSQL

                I think I have reported the problem you are having with the 
odbc and pdo and sql server under bug 38834.
http://bugs.php.net/bug.php?id=38834

It should up to me with large columns of text but my guess is the same.

As a temporary solution I am using adodb with sql server but there is a bug 
with time zones which I have a modified version of adbdb if you want it.

Aspen Olmsted
Alliance Software Corporation
17 Pitt St
Charleston SC, 29401
[EMAIL PROTECTED]

----------------------------------------

                                From: "Mike Matz" <[EMAIL PROTECTED]>
Sent: Monday, October 09, 2006 12:48 PM
To: [email protected]
Subject: SPAM-LOW: [PHP-WIN] Unicode data w/ PDO DBLIB, MSSQL 

Is there currently any way to retrieve Unicode data from SQL Server?
I'm working with SQL Server Express 2005, on a database that's been
restored from an old SQL Server 2000 database. I'm writing a PHP script
that imports data from the MSSQL database, processes it, and adds it to
a MySQL database with a different schema. So far I've been unable to do
this reliably, as there is a lot of multilingual, Unicode data in the
MSSQL database. I'm trying to use the PDO method of database access,
but could fall back on another method if this is impossible. I'm able
to connect to my database using either ODBC or DBLIB MSSQL drivers.
When using DBLIB, I get an error:

$db = new PDO('mssql:host=\\\\.\pipe\sql\query;dbname=my_db', $user,
$pass);
$sth = $db->execute("SELECT * FROM Products");
$sth->execute();
print_r($sth->fetchAll());

gives me this exception:

Fatal error: Uncaught exception 'PDOException' with message
'SQLSTATE[HY000]: General error: 10007 Unicode data in a Unicode-only
collation or ntext data cannot be sent to clients using DB-Library (such
as ISQL) or ODBC version 3.7 or earlier. [10007] (severity 5) [(null)]'

When using ODBC, I get very strange results. There are no errors or
exceptions, but in every row, all columns following the first
text/unicode column will be empty. For example, if I SELECT Product_ID,
Short_Description, Product_Season (Short_Description being TEXT,
possibly with unicode), Product_Season will be empty. However, if I
SELECT Product_ID, Product_Season, Short_Description -- I'll get the
Product_Season. Short_Description is empty in both cases (even if it's
not empty when viewing with SQL Query Analyzer).

Has anyone seen this behavior or have any ideas as to what I should try?

Thanks,
Mike



--- End Message ---
--- Begin Message ---
Hi,

VAGRA - save 70% http://www.greatgreenbay.info

  _____  

examination. Floyd had dug a small flute out of his pack and played a
his woolly mount skidded to a stop. He frowned down on me from behind


--- End Message ---

Reply via email to