note 107037 deleted from function.odbc-exec by danbrown
| From: | danbrown@php.net | Date: | Tue, 03 Jan 2012 21:48:24 +0000 |
| Subject: | note 107037 deleted from function.odbc-exec by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-185288@lists.php.net to get a copy of this message | ||
Note Submitter: gaiusgracchus33 at yahoo dot com
----
I was using odbc_exec with sql server 2005 and got the same error as the poster above:
Executing SQL directly; no cursor.
Turns out this generic error can happen for all sorts of reasons unrelated to cursors.
In my case it was a simple syntax error:
$stmt = "exec create_my_views('My_View_Name')";
instead of:
$stmt = "exec create_my_views 'My_View_Name'";
$result = odbc_exec($connection, $stmt); <- generated error
In some cases it has been noted that permissions errors (execute on stored procedure) have caused
this same error.
My particular error went away when I corrected the syntax in $stmt above.