php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57761 i5/OS problem with Stored Procedure DATE type parameter
Submitted: 2007-07-29 08:15 UTC Modified: 2015-09-03 13:21 UTC
From: sam at zend dot com Assigned:
Status: Not a bug Package: ibm_db2 (PECL)
PHP Version: 5.2.1 OS: i5/OS
Private report: No CVE-ID: None
 [2007-07-29 08:15 UTC] sam at zend dot com
Description:
------------
Stored procedure in i5/OS has a parameter as a DATE type. PHP extension IBM_DB2 running on i5/OS can not call this procedure. We are getting following SQL error in i5/OS 
SQL0180: Syntax of date, time, or timestamp value not valid. The problem appears only when using db2_bind_param function. 



Reproduce code:
---------------
db2_autocommit( $conn, DB2_AUTOCOMMIT_OFF );
$sql = "CALL louisa.test_a1(?)";
$val = '';
$stmt= db2_prepare($conn_resource, $sql);
db2_bind_param($stmt,1,"val", DB2_PARAM_IN);
$result = db2_execute($stmt);

Expected result:
----------------
The call to stored procedure should not get any SQL errors

Actual result:
--------------
We are getting following SQL error in i5/OS 
SQL0180: Syntax of date, time, or timestamp value not valid. The problem appears only when using db2_bind_param function. 


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-02-12 19:50 UTC] adc at us dot ibm dot com
Invalid issue:
DB2 does not allow '' as date

STRSQL
    > select cast('' as date) from sysibm.sysdummy1    
      Argument 1 of function CAST not valid.
 [2015-09-03 13:21 UTC] rangercairns@php.net
-Status: Open +Status: Not a bug
 [2015-09-03 13:21 UTC] rangercairns@php.net
Not a bug
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Jan 22 17:01:23 2021 UTC