List:MySQL ODBC« Previous MessageNext Message »
From:Mikael Grave Date:May 20 1999 2:45pm
Subject:MyODBC + PHP 3.0.6 (NT) = Cursors problems
View as plain text  

I use PHP 3.0.6 + IIS 4 under Windows NT 4.0.

Our database server is MySQL 3.21.x under Linux.

We have installed MyODBC 2.5 and configured it to communicates to our
Linux MySQL server.

We are able to browse tables and their content from Access 97 (through
MyODBC). Works fine!

But we are not able to perform SQL request using PHP odbc_query()
function. We always get the following error:

Warning: SQL error: [TCX][MyODBC]Using static cursors instead of requested
type, SQL state 01S02 in SQLSetStmtOption in
C:\Inetpub\wwwroot\........\import2.phtml on line 32.

In line 32, we perform a basic SQL query:

$connOutput = odbc_connect("xxxxxx", "xxxx","xxxxx");
$sqlstr = "DELETE FROM xxxxx";
$resultOutput=db_query($connOutput, $sqlstr);  // line 32

We have the same problem with SELECT or INSERT statements. So we can't run
any SQL query!

I have read MyODBC readme file and problems about "cursors" but I don't
understand why this would make all kind of query fail.

I have tried various options in the MyODBC connection configuration:
  - no options
  - option 2   (return matching rows)
  - option 128 (force use of ODBC manager cursors)
But it had no effect.

Have any of you encoutered this problem? Is it a PHP problem or a problem
in my ODBC configuration? (I run NT4.0 service pack 3, with the latest
ODBC 2.5 drivers).

Thank you for your help (I didn't found any related problem in the ML

Mikael Grave
Webmotion Inc.
Tel. (613) 241-2990
Fax. (613) 244-0557

MyODBC + PHP 3.0.6 (NT) = Cursors problemsMikael Grave20 May