php-windows Digest 9 Oct 2006 19:47:57 -0000 Issue 3052

Topics (messages 27215 through 27216):

Re: ImageCreate() function Problem
        27215 by: Arief Kurniawan

Unicode data w/ PDO DBLIB, MSSQL
        27216 by: Mike Matz

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 ---
Okay, Problem solved. You're great man...
I downloaded the stable version and it runs well.
Yes, I'm using dev version PHP 5.2 downloaded from
http://snaps.php.net/

Regards,

Arief K

On 10/5/06, Niel Archer <[EMAIL PROTECTED]> wrote:
Hi
that looks like you have a newer version of module compared to PHP.

Your original post said you had PHP v5.2, as the current stable release
is only 5.1.6, I'd suggest you check again.  If necessary download, and
install again

Niel

--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



--- End Message ---
--- Begin Message ---
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 ---

Reply via email to