Re: [PHP] New problem with PHP odbc_exec.

2001-04-18 Thread Yasuo Ohgaki
[From BugDB]

ID: 10375
Updated by: kalowsky
Reported By: [EMAIL PROTECTED]
Old-Status: Open
Status: Closed
Bug Type: Reproduceable crash
PHP Version: 4.0.4pl1
Assigned To:
Comments:

fixed in cvs, will not be in 4.0.5, but later releases.

Previous Comments:
---

[2001-04-18 08:23:59] [EMAIL PROTECTED]
Documentation tells me that odbc_autocommit can be called with one or two
parameters.
(Without the OnOff parameter, this function returns auto-commit status for
connection_id. )

Calling with two parameters works, with one I get a crash.

I'm using ODBC 3.520.5303.2 against a Access 2000 database with Access ODBC
driver 4.00.5303.01




---



ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10375edit=2


--
PHP Development Mailing List http://www.php.net/
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

You may find other bugs in BugDB.

Regards,
--
Yasuo Ohgaki


""Scott Fletcher"" [EMAIL PROTECTED] wrote in message
9bk5j8$iks$[EMAIL PROTECTED]">news:9bk5j8$iks$[EMAIL PROTECTED]...
   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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]


RE: [PHP] New problem with PHP odbc_exec.

2001-04-18 Thread Andrew Hill

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:[EMAIL PROTECTED]]
 Sent: Wednesday, April 18, 2001 9:37 AM
 To: [EMAIL PROTECTED]
 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: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] New problem with PHP odbc_exec.

2001-04-18 Thread Scott Fletcher

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"" [EMAIL PROTECTED] wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
 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:[EMAIL PROTECTED]]
  Sent: Wednesday, April 18, 2001 9:37 AM
  To: [EMAIL PROTECTED]
  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: [EMAIL PROTECTED]
  For additional commands, e-mail: [EMAIL PROTECTED]
  To contact the list administrators, e-mail: [EMAIL PROTECTED]
 
 


 --
 PHP General Mailing List (http://www.php.net/)
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]
 To contact the list administrators, e-mail: [EMAIL PROTECTED]




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]