Re: New problem with PHP "odbc_exec".

From: Date: Wed, 18 Apr 2001 19:08:43 +0000
Subject: Re: New problem with PHP "odbc_exec".
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-49247@lists.php.net to get a copy of this message
The table in the SQL have primary key already and I get this error message. So, I'll try your recommendation to disable part of the PHP script and recompile. Sometime it is better to move on than to struggle over it because no one seem to have the answer to the problem. Thanks, Scott ""Andrew Hill"" <ahill@openlinksw.com> wrote in message news:NDBBKFNCBCHANEGAKONKAECPICAA.ahill@openlinksw.com... > Scott, > > This error indicates that there is no index/primary key on a table that the > result set is coming from - and PHP has told the driver read the result set > into a into a cursor (which requires a primary key). > > Adding a primary key to the table will fix this, or passing a different > cursor type - keyset driven cursors are essentially 'sliding windows' - they > read a set of rows in, and then scroll back and forth. Upon reaching the > end of the set, they grab the next keyset in the direction of scroll, etc. > > Alternatively, instead of adding the primary key, you can disable "#define > HAVE_SQL_EXTENDED_FETCH 1 " in php_odbc.h and recompile. This will prevent > PHP from atomatically setting a cursor. > > Best regards, > Andrew > -------------------------------------- > Andrew Hill - OpenLink Software > Director Technology Evangelism > Universal Data Access Integration > http://www.openlinksw.com > > > -----Original Message----- > > From: Scott Fletcher [mailto:scott@abcoa.com] > > Sent: Wednesday, April 18, 2001 9:37 AM > > To: php-general@lists.php.net > > Subject: [PHP] New problem with PHP "odbc_exec". > > > > > > Hi! I don't understand why PHP is having trouble with the > > odbc_exec. Is > > there a bug in PHP code? Here's what the error messages said! > > > > "SQL error: [OpenLink][ODBC][Driver]No key columns found for table > > referenced by keyset driven cursor., SQL state IM909 in SQLExecDirect". > > > > This show that it had to do with primary (or secondary) keys or index > > issues. I'm using MS-SQL Sever and this table I'm using in the database > > have primary key already! > > > > So, what can I do to fix it? I need it to be working. When I use the > > Linux odbctest command and it execute without a problem. So, it > > is obvious > > the problem lie with PHP code, odbc_exec(); > > > > Thanks, > > Scott > > > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > > For additional commands, e-mail: php-general-help@lists.php.net > > To contact the list administrators, e-mail: php-list-admin@lists.php.net > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.general (#49247) next »