Can PHP read View in stead of Table?
| From: | WC Ip | Date: | Thu, 22 Feb 2001 04:22:10 +0000 |
| Subject: | Can PHP read View in stead of Table? | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-6854@lists.php.net to get a copy of this message | ||
Dear all,
I have install PHP on Linux and use Openlink ODBC Driver to link to MS SQL
server on Windows NT. Just now I can read data from Table on SQL server.
However, when I make View on the same database, I can't use PHP to extract data
from this View. When I do query on the View, error message shown:
Warning: SQL error: [OpenLink][ODBC][Driver]No key columns found for table
referenced
by keyset driven cursor., SQL state IM909 in SQLExecDirect in
/usr/local/apache_1.3.12/htdocs/internet.php on line 42
The possible problem may due to primary key of table. As testing, I found the
table
with primary i can access easily. However, when i remove primary key from the
same
table, error has shown and cannot show data.
May I solve this problem or this is the bugs of openlink ODBC driver?
Thanks for your help!!!
Peter