note 46558 added to ref.mssql
| From: | effeese at gmail dot com | Date: | Fri, 15 Oct 2004 13:28:39 +0000 |
| Subject: | note 46558 added to ref.mssql | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-78582@lists.php.net to get a copy of this message | ||
in relation to the "unicode problem" mentioned by andrej at dairyweb dot com dot au I
suggest use andrew at power-grid dot com's solution:
if you get a "Unicode data in Unicode-only collation or ntext data cannot be sent to clients
using DB-Library (such as ISQL) or ODBC version 3.7 or earlier" error you can use this kind of
code (in an MS environment, of course):
<?
$db = new COM("ADODB.Connection");
$dsn = "DRIVER={SQL Server}; SERVER={SERVER};UID={USER};PWD={PASS}; DATABASE={DB}";
$db->Open($dsn);
$rs = $db->Execute("SELECT * FROM table");
while (!$rs->EOF)
{
echo $rs->Fields['column']->Value."<BR>";
$rs->MoveNext();
}
?>
hope it helps.
----
Manual Page -- http://www.php.net/manual/en/ref.mssql.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+46558
Delete -- http://master.php.net/manage/user-notes.php?action=delete+46558&report=yes
Reason: bad code -- http://master.php.net/manage/user-notes.php?action=delete+46558&report=yes&reason=bad+code
Reason: spam -- http://master.php.net/manage/user-notes.php?action=delete+46558&report=yes&reason=spam
Reason: useless example -- http://master.php.net/manage/user-notes.php?action=delete+46558&report=yes&reason=useless+example
Reason: contains commercial links -- http://master.php.net/manage/user-notes.php?action=delete+46558&report=yes&reason=contains+commercial+links
Reason: useless note -- http://master.php.net/manage/user-notes.php?action=delete+46558&report=yes&reason=useless+note
Reject -- http://master.php.net/manage/user-notes.php?action=reject+46558&report=yes
Search -- http://master.php.net/manage/user-notes.php