php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13445 odbc_execute gives "SQL data type out of range" error for store procedure
Submitted: 2001-09-25 20:45 UTC Modified: 2002-04-16 14:03 UTC
From: gordonl at tts-sf dot com Assigned:
Status: Closed Package: ODBC related
PHP Version: 4.0.4pl1 OS: mandrake linux 2.15
Private report: No CVE-ID: None
 [2001-09-25 20:45 UTC] gordonl at tts-sf dot com
I am going to an informix 9.3 server and the following code works:

$ce_notes ="sfasdfasdfsadfsadfasdfasdf";
$sql = "insert into call_extension(ce_activity,ce_callresult,ce_notes) values (" . $ce_activity . ",3211664,?);";
   $stmt = odbc_prepare ($crs,$sql );
   $sqldata = array ($ce_notes);
   $r = odbc_execute ($stmt, $sqldata);

they following code fails:

$sql = "execute procedure web_cr_update(?,'ADD',1312,4748999,17057,'2001-09-25 15:34:16.000','2001-09-25 15:34:16',0,277,null,0,null,14999)";
   $stmt = odbc_prepare ($crs,$sql );
   $sqldata = array ($ce_notes);
   $r = odbc_execute ($stmt, $sqldata);

with the following error:

Warning: SQL error: [Informix][Informix ODBC Driver]SQL data type out of range., SQL state S1004 in SQLExecute in /home/httpd/html/followup/calladd.php on line 65

Note: The value in $ce_notes is the same in each case and the line number refers to odbc_execute line.

It also fails when I try:

$sql = "execute procedure web_filter_modify(?,14999,1312)";
....

Both stored procedures work within a c++ program.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-04-16 14:03 UTC] kalowsky@php.net
ODBC does not work with procedures, sorry.  Please read the MS ODBC specification for more information regarding this at 
http://www.microsoft.com/data/odbc


 [2012-02-13 20:08 UTC] tularis@php.net
Automatic comment from SVN on behalf of tularis
Revision: http://svn.php.net/viewvc/?view=revision&revision=323195
Log: Fixed incorrect english use (incorrect use of 'an' and 'one of those:' )

--
Provided by anonymous #13445 ()
 [2012-11-12 22:32 UTC] salathe@php.net
Automatic comment from SVN on behalf of salathe
Revision: http://svn.php.net/viewvc/?view=revision&revision=328328
Log: Add a cross-reference in the introduction to Class/Object functions to the discussion of the object type.

--
Provided by anonymous #13445
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jun 02 18:01:32 2024 UTC